Bay Area Rapid Transit, or BART (www.bart.gov [1], fares vary $3–10/one-way) to locals, is the Bay Area [2]’s late-coming answer to major metropolitan underground railways like Chicago’s L-train and New York’s subway system. Sadly, there’s only one arterial line through the City.
However, service directly from San Francisco International Airport into the City now runs daily, as does service to Oakland International Airport, the cities of Oakland [3] and Berkeley [4], plus many other East Bay [5] destinations.
BART connects to the CalTrain [6] system and SFO in Milbrae. See the website for route maps, schedules (BART usually runs on time), and fare information.
To buy tickets, use the vending machines found in every BART station. If you plan to ride more than once, you can “add money” to a single ticket. Then keep that ticket and reuse it for each ride.
Links:
[1] http://www.bart.gov
[2] http://www.moon.com/destinations/california/san-francisco-and-the-bay-area
[3] http://www.moon.com/destinations/california/san-francisco-and-the-bay-area/east-bay/oakland-and-alameda
[4] http://www.moon.com/destinations/california/san-francisco-and-the-bay-area/east-bay/berkeley
[5] http://www.moon.com/destinations/california/san-francisco-and-the-bay-area/east-bay
[6] http://www.moon.com/destinations/california/san-francisco-and-the-bay-area/getting-there-and-around/getting-around/caltrain