Complex movements of Earth’s tectonic plates created the San Andreas Fault inland from the coast of California.
It extends north and south through much of the state and is intersected by other faults, such as the Hayward Fault near San Francisco and the Garlock Fault near Los Angeles.
The San Andreas Fault is a result of the North Pacific plate and the North American plate slipping past each other. Some 30 million years ago, the land we call California was just west of the western Mexican coast.
Some 30 million years in the future, it may be off the west coast of Canada. If the two plates were slipping past each other smoothly, earthquakes would not be so common. The edges of the two plates, however, make contact.
Where they meet, the solid rock of Earth’s crust must adjust to the pressure and friction. When the solid rock can no longer bear the stress, rock breaks, and an earthquake begins.