There are 5 to 6 large fault lines that run through the San Francisco Bay Area region and many other smaller fault lines that branch out from these larger ones. The San Andreas fault is the most well known in the San Francisco area. It is believed to have caused both the 1906 Earthquake & Fire and the 1989 Loma Prieta Earthquake. It runs under the Santa Cruz Mountains, up through the Peninsula, near the Golden Gate Bridge, through part of Marin County, and then out to the Pacific Ocean.
Another notable fault line in the area is the Hayward fault. This one runs through the east side of the San Francisco Bay Area. It runs from Hayward up through Berkeley (the UC Berkeley football stadium sits right on top of it!) and north into the bay. This is the fault scientists are watching closely because it has been so long since the last big earthquake on it.
Scientists have studied the faults extensively and determined that the Hayward is probably the most dangerous. It has a 31.7% chance of rupturing in a 6.7 magnitude earthquake or greater before 2036, and the Bay Area has a 63% chance of having at least a magnitude 6.7 earthquake in the same time period.