Trains are the cheapest way to get from Johannesburg to Cape Town. I once took the Shosholoza Meyl train, it costed $50. The ride is supposed to take 26 hours but we ended taking 30 hours to get to Cape town due to the delays. My advice: Avoid taking this train, the delay is just so frustrating and inconveniencing.
Premier Classe trains are slightly more luxurious than Shoholoza Meyl trains but also face the same issue, delays. Cost $240. Duration: Also take 26 hours to get to Cape Town from Johannesburg.
Overally: trains are good in shape and have great onboard services bit the delays and the poor state of train stations is just a major disappointment.
Conclusion: Unless you're in no hurry then avoid trains.
There are several cheap flights from Johannesburg to Cape Town.
Frequency: There about 40 flights daily running between the two cities but only about 5 airlines offer direct flights from Johannesburg to Cape Town. Check on Skyscanner
Flight time: 2 hours 15 minutes.
It's not worth it take buses to Cape Town from Johannesburg since you can find a flight of almost the same price plus flights are faster, buses take 20 hours.