It really depends on what time of year you’re coming to visit. Of course there’s always random free/cheap events going on (I’d check the SF section of Craigslist); but, during the summer months there’s all of the different neighborhood festivals, where whole streets get shut down for the day/weekend and people are all out having a good time. Try a google search for: SF festivals.
Otherwise, there are these go-cart like vehicles (?If you can call them that?) that I always see people taking around the city and they have audio guides telling you about stuff & GPS to give you directions as you go on different tours on your own, or w/ one other person.
Personally, I’d say forget the tourist attractions (unless you absolutely need to check them off your list) and instead spend some time w/ good shoes walking around some of the different neighborhoods- again- just do a search on wikipedia for SF neighborhoods and you can get a feel for each so you can narrow it down. I do also highly recommend either walking or biking around Chrissy field, as it has hard to beat views of both the GG bridge and looking back at the city.
Wow, that was a novel…let me know if you have any other specific questions.
Best of luck!