The San Francisco Bay Area has supported human life for an estimated 8,000+ years, and today is no exception :)
Loosely affiliated pre-Columbian Native American tribes, now known as Ohlone (formerly Costanoan), were primarily hunter/gatherers subsisting on a large bounty of animal and plant life in the area.
The Spanish colonization of California combined territorial expansion and (involuntary) Catholic conversion - in San Francisco, founding the Presidio and Mission Dolores in 1776. In less than 60 years, the various Ohlone cultures and populations were destroyed even as the Spanish Empire itself was distintegrating.
The Catholic missions were secularized/decommissioned in 1833, and 13 years later the United States claimed California during the Mexican-American War - which was primarily a battle over Texas, with Mexico ceding Alta California (including the small 500-ish population settlement of Yerba Buena, later San Francisco) not the least because, there wasn't much here...
... except, gold :)
In 1848, James Marshall discovered gold at Sutter's Mill in Coloma (outside Sacramento) triggering a worldwide rush to the Sierra Nevada. With one of the world's finest natural harbors (undiscovered by early explorers, probably owing to the fog), San Francisco became a primary gateway for both miners and minerals (and coffee!), and the SF population grew from 1,000 to 25,000 people in less than a year, and far beyond that, quickly.
... and then, silver!
San Francisco's first two booms put it on the maritime map and spurred the third boom, the transcontinental railroad.
In aggregate, these movements generated massive wealth for local entrepreneurs and businesses (including Levi Strauss, Wells Fargo, James Fair, James Flood, Mark Hopkins and Leland Stanford), created one of the largest Chinese populations outside Asia, started the iconic Victorian architectural tradition, inspired the invention of Cable Cars (to spare horses!), forged Golden Gate Park (in the spirit of New York's Central Park) all the way out to the ocean and the playful Sutro Baths - and literally blasted San Francisco into the world as both a frontier land of opportunity and a cultured "Paris of the West".
Following this initial triple boom and owing both to rapid construction and the use of coastal redwoods, fires were a constant threat (and firefighters a topic of active adoration), culminating in a (nearly) all-consuming blaze in the 1906 earthquake, after which the city was almost entirely rebuilt, bigger and better organized than ever (with a 10+ million gallon water reservoir under Twin Peaks). The post-fire/1906 20th century brought the boom back with the opening of the Panama Canal (vastly improving SF shipping channels with the east) and the related Panama-Pacific Exposition along what is now Crissy Field (of which the Palace of Fine Arts remains). The Great Depression didn't hit San Francisco as hard as other places, and both the Golden Gate and Bay Bridges were completed (within 6 months of each other). In 1939, Bill Hewlett and David Packard tossed a coin and named their Palo Alto (one car!) garage company "Hewlett-Packard" - starting a local tradition of technological entrepreneurship that continues to boom and bust, invent and morph its way into the future.
Owing to both it's excellent port and relative prominence on the west coast of the United States, San Francisco was a major production and supply channel during World War II, and a major port of re-entry afterwards.
Following the war, many made it home and participated in post-war boom, while a much smaller number focused on the hear-and-now of personal experience, ultimately known as the Beatnik movement. In particular, the sexual and chemical explorations of the Beats inspired the now-famous 1960's Hippie movement (literally, "little hipster") centered around the Haight-Ashbury district (to this day), and as the drugs got harder, many of the more erotically-inclined participants moved east (to the nearby Castro and relatively family-free SOMA districts) which shortly became bastions of sexual and personal liberation, particularly for gay men. At the same time, UC Berkeley developed a culture of political resistance, especially for free speech against the Vietnam War, further establishing the Bay Area (especially in the mind of outsiders) as a place to resist convention. Burning Man (1986), Critical Mass (1992), same-sex marriage legalization (2004) will not have national and global impact for decades, but their birthplace is probably not accidental.
The 1970's and 80's brought huge buildings (eg, Transamerica Pyramid) and a huge virus, AIDS. Downtown is a living testament to the massive building spree, and the more-sex/less-relationship oriented gay population in SOMA is signficantly less visible (the Folsom Street Fair and Mister S are notable reminders). Even 10 years ago in the more-relationship oriented and more-political Castro (eg, Harvey Milk), it was common to see suffers of full-blown AIDS. As the drugs and awareness have improved, the HIV/AIDS situation is less apparent, but very real - according to the CDC, 1/4 of San Francisco men who have sex with men are HIV positive (be careful!)
Following the Loma Prieta earthquake in 1989 (during the trans-bay Giants vs. A's World Series), the construction boom of the previous decade continued especially in SOMA and along the Embarcadero. And the late 1990's created one of the biggest economic and technology booms in history to SF, and the area still dances to its quirky beat (virtual goods?!). The current batch of super-hot SF companies revolve around the local, real and mobile - eg, Twitter, Yelp, Airbnb, Instagram, etc (... and Zynga) - cultural trends that play out well beyond the tech industry with food trucks, street art, and massively increased bicycling, both in ridership and political power.
Otherwise, the Giants won the 2010 World Series (their first since leaving New York in 1957!), Kelly Slater won his 11th World Surfing Championship at Ocean Beach in 2011 and even the 49ers are showing signs of life :)