BART is a commuter train that serves the Peninsula, San Francisco, and the East Bay. It is very oriented towards getting commuters into and out of downtown SF, and travelers to and from the San Francisco and Oakland airports.
Caltrain runs between the South of Market area of San Francisco and the city of Gilroy. It is also commuter-focused.
There are some buses between SF and the East Bay, and others that go down the Peninsula or up into the North Bay. These may be operated by Muni or by the transit providers of other cities.
There are ferries that go between SF and a few cities in the North and East bay areas.
Muni is usually the best public transit option for getting around San Francisco itself, though in some cases BART is better for that if your line of travel happens to correspond with the single BART track that runs under the city. Muni operates both buses and light rail cars. There are also (a few) taxis and a few taxi alternatives like Uber and Lyft.
The most authoritative resource on transit options in SF is 511: http://transit.511.org
But Google Maps also provides transit directions, which can be quite handy: https://maps.google.com/maps?q=San+Francisco,+CA