Depends on what you're after:
If convenience is more important, take a cab. They're usually plentiful. Quickest to get, and fastest to get you to the W. Cost is around $30 as others have mentioned. If I'm feeling tired or like I don't want to wait at all, I take a cab.
A shuttle is going to run around $13-15 (with tip) and offers pretty good service. If it's not too late, I'll usually take a shuttle. FYI SuperShuttle, the biggest player, is much more plentiful at the North (UA) terminal than at the South Terminal where AS flies into.
If you're on a really tight budget, I would consider the SamTrans bus a better option than CalTrain. It runs way more often.
We'll all be taking BART into SF in a couple of years...