Earth is dynamic! It is in a constant state of change; changes resulting from both constructive and destructive forces acting on it. One such force is an earthquake. When an earthquake occurs waves of energy called seismic waves are produced. There are two categories of seismic waves. Primary (P-waves) and Secondary (S-waves) are body waves that travel through the earth. Think of the P-wave as the Hare and the S-wave as the Tortoise, but in this case unlike the fable the Hare wins the race. P-waves can travel through both solid materials like rock and fluids like liquid and gas. Since these materials do not impede the movement of P-waves, they travel faster than the other seismic waves and arrive at the seismic recording station first. Some animals have been known to hear P-waves and react even before the shaking of the surface waves begins. Secondary waves are slower, and can only pass through solids; they disappear in fluids like liquids and gases. The second category of seismic waves are surface waves which roll over the surface of the earth. Love (L-waves) and Rayleigh (R-waves) are surface waves. Volcanic eruptions and landslides have also been known to generate seismic waves.

More Info: en.m.wikipedia.org