From an examination of the displacement of the ground surface which accompanied the 1906 earthquake, Henry Fielding Reid, Professor of Geology at Johns Hopkins University, concluded that the earthquake must have involved an "elastic rebound" of previously stored elastic stress.
If a stretched rubber band is broken or cut, elastic energy stored in the rubber band during the stretching will suddenly be released. Similarly, the crust of the earth can gradually store elastic stress that is released suddenly during an earthquake.
This gradual accumulation and release of stress and strain is now referred to as the "elastic rebound theory" of earthquakes. Most earthquakes are the result of the sudden elastic rebound of previously stored energy.
The following diagram illustrates the process. Start at the bottom. A straight fence is built across the San Andreas fault. As the Pacific plate moves northwest, it gradually distorts the fence. Just before an earthquake, the fence has an "S" shape. When the earthquake occurs the distortion is released and the two parts of the fence are again straight; but now there is an offset.
This diagram greatly exaggerates the distortion. Actually, the distortion is spread over many miles and can only be seen with precise instrumentation (e.g. GPS).
This picture, taken near Bolinas in Marin County by G.K. Gilbert, shows a fence that was offset about 8.5 feet along the trace of the fault (from Steinbrugge Collection of the UC Berkeley Earthquake Engineering Research Center).
For more details see:
Reid, H.F., The Mechanics of the Earthquake, The California Earthquake of April 18, 1906, Report of the State Investigation Commission, Vol.2, Carnegie Institution of Washington, Washington, D.C. 1910 (see especially pages 16-28).