The San Andreas Fault is a roughly 800m long tectonic boundary that runs straight through California.
The Earth is made up of a solid core of iron, then a liquid layer of iron, on top of which is a thick liquid layer of the mantle, then the asthenosphere, and finally, floating on top, is a load of massive cracked up rocky plates the size of continents that form the crust. Because the magma in the middle of the earth is so hot, it swirls about, and forms convection currents. These currents force the pieces of crust (the tectonic plates) to rub against each other, along "fault lines".
The vast pieces of crust are known as tectonic plates. The meeting of the North American Plate and the Pacific plate forms the San Andreas Fault, upon which sits the city of San Francisco. Depending on the movement of tectonic plates where they meet other plates, they are named different. The San Andreas Fault is a "conservative margin," because the plates slide alongside each other without pushing up or down or pulling apart. The Pacific plate moves vaguely northwest, and the North American plate heads the opposite direction, roughly to the southeast.
Unsurprisingly, the plates are very rough, and end up somewhat locked together, with one plate forcing one way and the other pushing the other way. This leads to a huge pressure build up, meaning that every once in a while they slip out of their locked position and jerk past each other. This is what causes an earthquake, and this is why earthquakes are so common along the edges of plates, particularly conservative margins. These can be tiny, harmless affairs, or havoc-wreaking destroyers of cities, as the inhabitants of San Francisco know.
On the 17th October 1989 a quake measuring 6.9 on the Richter scale (described as "strong - can wreak severe damage across 100 miles or more") struck near San Francisco. 9 people lost their lives as the twin-level highway's top level collapsed on the bottom during the rush hour. However, thanks to the heroic rescue effort, and earthquake-proofed buildings, the death rate was relatively low. Other recorded quakes have measured as much as 8.0 on the Richter scale, meaning that the San Andreas Fault has been responsible for some of the most powerful quakes in history.
On a day to day basis however, the San Andreas fault is much less dramatic, moving about as fast as your fingernails grow. It is a thoroughly dramatic sight, forming a vast craggy scar on the landscape.