San Francisco International Airport (SFO) is probably the closest airport to the city, but Oakland Airport (OAK) is also nearby. Travelling from downtown SF to either airport takes about 45 minutes; if travelling through Oakland, give yourself another ten or fifteen minutes for the AirBart bus ride from the Bart station to the airport. Flights into San Jose, which may be significantly less expensive than those into SFO, are worth considering if you already plan on renting a car; the drive up to the city will take you about an hour to an hour and a half, though, depending on traffic.
Francisco Bay Area Map
San Jose International
Bus, Bart and Muni map, in .pdf format