Earthquakes are caused by the sudden movement of tectonic plates along fault lines, releasing energy in the form of seismic waves. These plates are constantly moving but get stuck at their edges due to friction. When the stress overcomes this friction, the plates suddenly slip, causing an earthquake.