The infamous San Andreas fault is not a single crack where the North American and Pacific plates slide past each other. It's the largest of a thicket of faults that collectively absorb the motion of the plates. Along this seam, the plates slide past each other like cars traveling opposite directions on a highway. On these, blocks of crust either push together or pull apart, with one block sliding either up or down a sloped fault plane. Flash animation, 20K. You will need the free Flash plug-in to view this animation.
Stress builds up in fault zones when crustal blocks stick together.
But when a fault is stuck, the rocks on either side of it store the building stresses until a critical limit is reached, and the rocks move suddenly along the fault, releasing the stresses like a spring uncoiling. This pumps seismic waves into the surrounding rock. Seismic energy travels through the crust in the form of waves. Surface waves, by contrast, are confined to the upper few hundred miles of the crust. They travel parallel to the surface, like ripples on the surface of a pond.