When you click your fingers, friction between your fingertips allows you to increase the pressure until it is released suddenly.
In a similar way, friction between rocks near Earth’s surface allows pressure to build up slowly over time. When the pressure becomes too great, the slabs of rock jump or snap, releasing a massive pulse of energy through the surrounding rock, known as a seismic wave.
The rocks vibrate back and forth for a while before coming to a stop. Each back and forth is the shaking we feel as an earthquake.
The huge forces that produce earthquakes are due to the movement of tectonic plates – huge pieces of Earth’s outer shell that are slowly moving up to a few centimetres a year.