Good advice thus far. I would also condition details on when you were planning to do this. There are foreign inbound visitors who plan their entire holiday in the states around a visit to Alcatraz which they will reserve well in advance, as rjque has already stated.
Depending on where you're staying near the airport, you may be reasonably close to the Millbrae BART station (I've stayed at both the Westin and Marriott and walk over). In those cases, if I won't need or have a car, I'll often ride BART into The City, usually to Powell Street Station. That gives me access to Moscone Center, Union Square, the Apple Store, Cable Cars to Chinatown/Nob Hill/Fisherman's Wharf, et al. Or I might stay on BART until Embarcadero Station and catch a ferry (boat) to Sausalito, then back to Fisherman's Wharf, etc. Lot's of possibilities!