Earthquakes occur when built-up stress along a fault causes rocks on either side to suddenly slip and move past each other. This slipping vibrates the Earth's crust and causes seismic waves. According to the elastic rebound theory, stress increases in locked faults until the rocks fracture and spring back into a new position, releasing seismic energy. Most earthquake foci are shallow beneath the Earth's surface, where the majority of faults are located. The largest earthquake zones exist along plate boundaries like the Pacific Ring of Fire.