Here's the way I usually get back and forth from the city and SFO and it costs less than 3 dollars, but can take really long if you aren't lucky.
After you've gotten you're bags check a map and find the closest Cal Train Shuttle stop. The shuttle is free and it takes you to Milbrae Station. From Milbrae Station you can get the train into SF. Now, the first time I did this I fucked up and got on a train going to San Jose, which is the opposite direction. To prevent this when you are standing facing the tracks with the station building behind you, you want to get on the train heading in the leftward direction.
Take the train to the last stop, 4th and King Street. I don't know where you're going from here, but you are in San Francisco and if you like you can stop by my shop which is about a block away and maybe I can get you going where you need to be.
If you want to go to the shop from the station walk up 4th Street towards the big buildings (downtown.) Cross over Townsend and then make a LEFT! onto Bluxome Street. Walk halfway down the block to 63 Bluxome and you are there.
If at all possible DO NOT take a cab from the airport. It's 12 miles and it can get fucking expensive. Find a Super Shuttle stop and get one of them. They're either 12 or 14 dollars per person to get where you want to go in the city.
I use super shuttle every time...you get your baggage...go outside...they take you right to your doorstep and it costs like 12 bucks...the only bummer is that you have like 4 other people doing the same...so you have to make their stops...but it is worth it and way cheaper than a cab...