From San Francisco airport
The easiest way to come from SFO to San Francisco is to use the BART. It will take you to the center of the city or East Bay.
There are 3 to 4 trains per hour and it takes about 30 minutes to connect the airport to the center of San Francisco. The BART station is located in the International terminal, departure level, side G.
If you arrive or depart for a domestic flight, use the SFO Airtrain shuttles which are free and will take you to the BART station.
Good to know:
– The schedules of the first trains change between weekdays and weekend
– All trains stop at 1:35 am during weekdays but it changes on Saturday and Sunday
– To give you an idea of the price, the return ticket between SFO and San Francisco costs around $21 per adult
All details are here
From Oakland Airport
Oakland Airport is also served by BART and the station is located in terminal 1, opposite the baggage belts. Whether you are traveling to Oakland or San Francisco, you will need to change trains at the Coliseum station.
All the details are on this page: https://bartable.bart.gov/latest-news/how-ride-bart-airport.
From San Jose Airport
It’s getting trickier… no direct connection between Caltrain or BART is available. It is possible as always but not very convenient https://www.flysanjose.com/public-transit.