Much of western California is composed of small lighter landmasses scraped off of the Pacific Plate as the heavier mantle sank under the North American Plate, and the San Francisco Bay Area is no exception. Here's an illustration of how some of CA was formed as the Pacific Plate was subducted under the North American Plate:
As these separate landmasses were scraped off the Pacific Plate, they formed distinct rock types, with the boundary of each forming a distinct fault. Here's a good illustration of what that looks today:
Of course, these faults and rock types will be different depending on what cross section you're looking at.
I know this isn't a complete description, but I think it's a good starting point.
These illustrations came from USGS bulletin 2195, which can be found here. It's an interesting read in and of itself.