The shaking motion of an earthquake is the result of a sudden release of energy. Earthquakes are caused when stress, building up within rocks of the earth's crust, is released in a sudden jolt. Rocks crack and slip past each other causing the ground to vibrate.
Cracks along which rocks slip are called faults. They may break through the ground surface, or be deep within the earth. The location on a fault where slip first occurs is called the focus, whereas the position directly above it on the ground surface is called the epicentre.