San Francisco International Airport: The sensible public-transit route is BART from SFO to Millbrae, then Caltrain south to Palo Alto. Allow roughly 60–80 minutes including the connection and about $10–15 total; Caltrain is not metro-frequent, so check its schedule before committing. A car or rideshare is faster only outside heavy traffic, and can be expensive.
San José Mineta International Airport: Take the free VTA Route 10 airport shuttle to Santa Clara Caltrain, then Caltrain north to Palo Alto. Budget about 50–70 minutes and roughly $6–10 depending on fare structure. The cheaper, slower alternative is VTA Rapid 522 or local 22 along El Camino Real; it is useful only if your hotel is on that corridor.
Palo Alto Caltrain Station: This is the arrival point to aim for: it is beside downtown University Avenue and connects to Stanford’s free Marguerite shuttle. From San Francisco, Caltrain takes about an hour on regular service; limited-stop Baby Bullet trains can be quicker at commute times. Buy/activate a Caltrain ticket before boarding and do not assume every train stops at California Avenue or Palo Alto.
California Avenue Caltrain Station: Use this smaller station for hotels or plans around California Avenue and south Palo Alto. It is about 2 miles from downtown and has less frequent service than Palo Alto Station, so it is a convenience stop rather than the default.