Cape Town's city bowl, sitting beneath Table Mountain, has a compact, walkable centre with clear sightlines to the mountain that make orientation fairly easy. The waterfront area is flat, pedestrian friendly and well used by both visitors and locals for walking at almost any hour.
Beyond the city bowl, the wider metropolitan area sprawls considerably, and its neighbourhoods are not evenly walkable or evenly safe, so it pays to research a specific route rather than assuming free rein to wander as in a European city centre.
Table Mountain and the surrounding trails offer serious hiking rather than casual city walking, with real elevation gain and changeable weather, so they call for proper preparation rather than a spontaneous stroll in city shoes.