Taxis in San Francisco are, for a large city, surprisingly inefficient and expensive. Except for taxi stations at or near downtown business hotels, or cruising just a few major arteries, taxis can be hard to find and hail, and calling for a cab can mean a 30-45 minute wait, if the cab shows up at all. Now, if you're anywhere near Union Square and are holding shopping bags, just by standing on the curb and hailing passing cabs will usually get you one quite quickly. It is significantly easier to catch a taxi on weekdays, not including Friday night.
If you are heading to the airport, your best bet is to call ahead with a specific pickup time to one of the many taxi companies. You will also want to schedule your cab ahead of time because if you are going beyond 15 miles, you will end up paying 50% extra.