California is on two tectonic plates, the North American plate and the Pacific plate. Also these two plates are separated by the San Andréa's fault which is a strike slip fault. The plates rub against each other, and the crust in the zone deforms building up elastic strain.
When the stress builds up to its maximum capacity it breaks causing the crust to spring up to its regular position. This movement releases seismic waves which are the real reason for Earthquakes.