There's a lot you can do but what is best depends not only on your interests but also on time of day.
One of my favorites for a few hours on a nice day: BART to Embarcadero complex near the clock tower at the end of Market and the Bay. After browsing shops (there's also Embarcadero movie complex) walk north along the Bay a ways, then cut in towards Battery Street, to Il Fornaio Restaurant (if hungry, they're open 3 meals/day, good food, patio, cool walk-through fountain outside). Then take the steps through the gardens behind the plaza there up to Coit Tower, beautiful views in all directions, tour the old murals in the Tower.
Come down the other side in north beach, walk up to the touristy wharf area and gawk at the tourists, watch the boats. Continue on to the Marina Green. If tired, bus or cab back to Bart.