Surrounded by water on three sides, the city has a relative bounty of natural beauty given its high population density. Baker and Ocean Beach provide sandy building opportunities, Lands End is a great hike. Golden Gate park is predominantly green and a great place to stretch your legs on an extended walk or run.
Otherwise, crossing the Golden Gate Bridge to Marin County provides a wealth of natural wonders both along the coastline and inland. The coastline is similarly beautiful southward along the peninsula, while the inland is more developed. The East Bay hosts some excellent natural spots although they are further from San Francisco