Johannesburg serves as your port of entry and exit when visiting South Africa. A giant, all-consuming megalopolis, it's simply impossible to consider not visiting it, even if it does have one of the highest crime rates in the world. Whenever possible, use taxis to travel from one district to another. If you go anywhere on foot, make sure you know the way exactly. The type of area you're in can change from one street to the next.
But let's not get paranoid, Johannesburg is well worth exploring for its culture, its energy and its place in history. Be sure to visit Constitution Hill, the Number Four prison, the Apartheid Museum, the Origins Museum and, of course, the famous urban residential area of Soweto.
Johannesburg is in the process of transformation, the city fascinates me and frightens me: the quarters in the centre are always very dangerous, no one hangs around there during the night, but you feel a change, with rehabilitations block by block like in New York in the 1980s. Be careful in your choices of transport methods (take the motorways if you go through the centre by car) but don't fall into paranoia, the nice quarters are safe.
Rich people live in golden prisons, in villas with a swimming pool under high protection around Sandton, the new Quarter of affairs far from Downtown, that I personally didn't like much. There is no shopping in large luxurious malls so in the centre there are all nice museums and bars...
It's a city which is at the same time split up but also dynamic, with a lot of work opportunities with recent black graduates, which creates a true social mix, which is rare to find elsewhere in the country (for the moment) It really is beautiful and quite mad to find in the centre of Jo'Burg, at the same time new alternative places as well as skyscrapers and shops with Art deco abandoned to their fate. Some are renovated like the Carlton tower (the visit of the last floor for the view across the city is called Top of Africa, it is unmissable).
The best thing is to take the open top Johannesburg City sightseeing bus to make the most of it. It stops at all the touristic place, it costs a lot less than a taxi and the guided visit is well documented, the journey safe. On Sunday, you can visit the Maboneng Project, a closed down factory in the middle of Hillbrow transformed into a gastronomical market and a flea market, while on Saturday it's in Braamfontein where it is held, a new block of bars and branched restaurants where the Neighbourhood Marker is set up (gastronomic stands).
Certain museums are unmissable in Johannesburg : the museum of apartheid, the contemporary art galleries, the Africa Museum, the all new Wits Art Museum, and of course Soweto but it's not very near, (Nelson Mandela's house, Hector Pieterson museum amongst others). The city of Pretoria isn't far either, it's the same megapolis and with the new Gautrain it's very easy to get there. I have loved discovering a youth connected, finding good sites to go out and listen to South African deep house. The city has the image of a futuristic Africa!