The San Francisco Bay forms an exceptional natural harbor that for Native Americans was an ideal home for millennia. The ideal harbor that the bay presented caused the Spanish to established a "presidio" here at the end of the San Francisco peninsula.
The formation of the the rocks that underlie the Presidio took place earlier...a lot earlier. Like tens of millions of years earlier.
The geology you see around San Francisco is the result of forces along the Pacific and North American plates. Today, the Pacific Plate is slowly creeping north past the North American Plate, forming the San Andreas fault system. San Francisco Bay was created by movement on these faults about 650,000 years ago.
However, the local geologic history goes back even further ... long before the San Andreas became so famous, or even was formed some 28 million years ago. The rocks that underlie the Presidio are 100 million to 200 million years old. Our old rocks were the result of a tectonic plate movement called subduction. Subduction means one plate moves under or "subducts" under an adjoined plate.
During subduction, pieces of ocean crust and marine sediments were broken up and added to the edge of North America, along with some mantle rock altered to serpentinite. These rocks form the Franciscan Complex, which in the Presidio is largely made up of serpentinite, like that found on the coastal bluffs at the south end of the Golden Gate Bridge (seen above).
Resting on these old rocks are sediments of the Colma Formation, dating back a mere 125,000 years. This was a time when sea levels were higher than even today, during a warm interglacial period. The Colma is locally covered by sand dunes blown in as sea level rose following the last glacial period.