The boundries where two plates collide, and one is pushed down under the other is called a subduction zone . Most all very large earthquake occur within subduction zones. When two plates slide past each other, this is a transform boundry . Earthquakes also occur at this type of fault. This extensional movement at the crust allows for the magma to push up to form new crust in the space that was made.
Earthquakes occur due to the pressure, and breaking of rock.
This map shows where earthquakes repeatedly occur on the globe. Notice how the occurrances of earthquakes mostly happen at the same places that there are plate boundries. California is the located on the boundary of two tectonic plates. The Pacific Plate, and the North American Plate both meet on the California coast. Although there is earthquake activity in the Arizona area, there is more in California due to the plate boundry there.