An earthquake is caused by the release of energy stored in rocks that are sliding past one another deep underground. When the rocks finally slip, they snap back into position, releasing this stored energy in the form of waves that travel outward in all directions through the earth. There are different types of earthquake waves that move the ground in various ways and travel at separate speeds, allowing scientists to determine the distance to the earthquake's origin. Earthquake waves can travel great distances depending on the magnitude of the quake, sometimes going around the entire planet multiple times for very large seismic events.