Earthquakes release waves of energy called seismic waves. They travel through the interior and near the surface of the Earth.
P-waves, or primary waves, are the fastest moving type of wave and the first detected by seismographs. They are also called compressional or longitudinal waves, and push and pull the ground in the direction the wave is traveling. They usually cause very little damage.
S-waves, or secondary waves travel more slowly than P waves. These waves travel in the same direction, but they shake the ground back and forth perpendicular to the direction the wave is traveling. S-waves are more dangerous than P-waves because they have greater amplitude and produce vertical and horizontal motion of the ground surface.
The slowest waves, surface waves, arrive last. They travel only along the surface of the Earth. There are two types of surface waves: Love and Rayleigh waves. Love waves move back and forth horizontally. Rayleigh waves cause both vertical and horizontal ground motion. These can be the most destructive waves as they roll along, causing the ground to rise and fall as they pass.
This post is part of Exploring Earthquakes, a rich collection of resources co-presented by the California Academy of Sciences and KQED. This material is also available as a free iBooks textbook and iTunes U course.