Earthquakes are caused by movements of plates underneath the Earth's surface. The places where these plates meet are breaks in the Earth's crust called faults. Earthquakes often happen when these plates along the faults move in different directions. These shifting plates create energy that is called seismic waves. These waves move outward just like waves that are formed by a disturbance in a body of water (picture the rings in a lake when you throw in a pebble).
There are different types of seismic waves. Body waves travel underneath the Earth's surface, through solids, liquids and gas. Primary body waves are the fastest. When they reach the surface they become surface waves, and they continue to travel above the ground. Secondary body waves come right after the primary waves and don't reach the surface. Surface waves are the slowest waves. They cause the most intense vibrations and damage at the end of an earthquake.
Have you ever been in a bad one? What happened?