You can actually describe a line of cars mathematically with exactly the same equation used to describe masses connected by springs. This is a well known dynamic system, and when you have enough masses connected, at some point one of them will stop moving. This is where these traffic jams occur. It is due to each persons reaction time adding up, so if the front cars speed varies, this compounds down the line and eventually you have a traffic jam.
What is interesting, if you look at the maths, there are two easy ways to improve the situation. If you increase the gap between cars it reduces this effect. But in SA a gap is just an invitation for another car to move in. The second way, is to reduce the speed limit. In the UK there are electronic speed limit signs that vary the speed limit depending on the amount of traffic (what I heard). This is to try and prevent traffic jams like these.