There is a free shuttle between UCSF hospitals. Here is the link for the schedules for the various shuttles: http://www.parking.ucsf.edu/transportation/shuttles/timetables
There is also a shuttle to the VA Medical Center, which only runs once per hour from 8 am to 5 pm. The VAMC shuttle picks up near the emergency room at UCSF.
UCSF Map & Transportation website
Here’s the link to the official UCSF Map and Transportation website: http://www.cas.ucsf.edu/transportation/.
The public transportation system in San Francisco is called MUNI.
The fare is $2.00. Don’t forget to ask the conductor for a transfer as this is your proof of payment. Transfers generally last for several hours so you may be able to use them again on your trip back and avoid paying another fare!
to plan your trip around San Francisco, another useful site is 511.org