cynic-al is right about the piers, they're a horrible touristy old crock with adverts shouting at you from every surface, but hidden among them are:
Musée Mécanique, full of weird old arcade machines.
Segway tours by Electric Tour Company, who make you wear hi-vis and a helmet, but it's totally worth it just to mess around on a Segway if you've never ridden one before. Much more fun with friends obv.
If you find yourself near 9th and Irving (Near east end of Golden Gate Park), Arizmendis is one of the best bakeries I've ever been to.
The Sycamore in The Mission does pork belly donuts. Deep fried, battered pork belly filled with maple syrup. You can basically feel your arteries clogging up as you eat them (Slightly dodgy neighbourhood around 16th and Mission though; not as dodgy as Tenderloin).
If you like architecture: Coit Tower (Telegraph Hill, which it's on top of, is well worth wandering around too. Most of the roads marked on google maps are wooden boardwalks through the trees, which have parrots in them), Palace of Fine Arts, Embarcadero Center, De Young Museum (Has a good observation tower, some free exhibitions, excellent sculptures in the grounds, and a permissive photography policy in most galleries).
If you like nature or science: The California Academy of Sciences (opposite De Young) has a living rainforest habitat with lots of non-native species.
If you get tired wandering about near Market, Yerba Buena Gardens is a nice spot to relax.
Marin does have some spectacular views. Repack Road's just up near Fairfax too