There are two types of earthquake waves, body waves and surface waves. There are two types of body waves, P-Waves and S-Waves, which both travel through the body of the earth. P-waves (primary) arrive first, while the S-waves (secondary) arrive second.
P- waves shake the earth's surface up and down. They are compressional waves, which travel through the body of the earth, compressing and expanding the material through which it travels.
S-Waves, the second wave to arrive, shake's the earth's surface side to side. They are transverse waves, which travel through the body of the earth.
Surface waves move on or near the earth's surface. They are considered a compressional wave, as they move the earth's surface in an up and down rolling motion.