Earthquakes occur mainly because of movements in the Earth’s tectonic plates. The Earth’s crust is not a single piece; it is made of several large and small plates that float on the semi-liquid mantle layer. When these plates collide, slide past each other, or move apart, stress builds up at the boundaries. When this stress is suddenly released, it causes the ground to shake. This release of energy is what we feel as an earthquake.
Most earthquakes occur along plate boundaries such as the Pacific Ring of Fire.