Movements within the Earth’s crust cause stress to build up at points of weakness, and rocks to deform.
Stored energy builds up in the same way as energy builds up in the spring of a watch when it is wound. When the stress finally exceeds the strength of the rock, the rock fractures along a fault, often at a zone of existing weakness within the rock.
The stored energy is suddenly released as an earthquake.
Intense vibrations, or seismic waves, spread out from the initial point of rupture, the focus, like ripples on a pond.
These waves are what makes the ground shake and can travel large distances in all directions. Near the focus, the waves can be very large, making them extremely destructive.