It’s really a day-trip to do justice to the Cape of Good Hope. Allow time to walk through the nature reserve (never alone). There’s a funicular to the top of Cape Point, but then still a good walk to the lighthouse for spectacular views of the ocean. Watch out for baboons, which can be aggressive.
The most spectacular route is through Chapman’s Peak. Leave Cape Town through Sea Point on the M6, then follow the signs.