Most earthquakes happen because of the movement of tectonic plates, the large pieces of the Earth's outer shell that move slowly over time.
The process: 1) Plates move past, towards or away from each other, usually at a few centimetres a year. 2) Along the edges (called faults) the rocks can get stuck, and stress builds up. 3) When the stress is greater than the strength of the rock, the rock slips suddenly and releases energy as seismic waves. 4) The point underground where this starts is the focus, and the point on the surface above it is the epicentre. 5) Earthquakes are most common around plate boundaries, such as the Pacific "Ring of Fire".
Scientists can map where earthquakes are likely, but they cannot predict the exact time of one.
Do you know which plate boundaries are closest to where you live?