Driving in traffic is a skill, and it takes practice. The most important thing is to be aware of drivers in front and behind, so you can choose lines and braking points that are less likely to get you in trouble. When following more than one car, make sure to look further ahead than just the car in front, as that will give you more time to react to trouble.
One thing that I haven't seen mentioned here, is that even in a two car battle, if you are following nose to tail, even if you are following a car that is identically prepared, you can't drive with identical lines/accel/braking. There are two reasons for this:
1) the draft will cause you to go faster in the straight
2) field compression under braking means that the following car will need to brake earlier that the leading car, unless there is enough space.
To illustrate point #2, if you both in the same car, lets say it's 14 feet long, and you are following 3 feet behind. When you are going 120 mph down the straight, you will be 17 feet and 0.1 seconds behind.
However, when you enter a 40 mph corner, in order to maintain that same 0.1 second gap, you would need to be about 6 feet behind, or your nose would need to be equal with the leading driver's door!
To maintain the same 3 foot gap between yourself and the leading car, you'd need to fall to about 0.25 seconds behind. This means that you'll need to brake earlier or you'll run into the back of the leading car. This is why fields of cars in road races seem to get strung out over the course of a couple laps, even though their qualifying times would seem to indicate that they could run much closer to each other.
When running in a pack of cars, this gets magnified by each car running nose to tail. If you are 3rd in a line of cars like the above, the 2nd car brakes earlier and falls to 0.25 sec behind. The third car will have to brake even earlier and fall to 0.5 sec behind the leading driver (from 0.2 sec on the straight).
Hugo Boss gave some good advice on this in the 2nd thread that RussRobit linked:
When you have cars right in front of you going into the first corner, you need to brake earlier than them to avoid a collision. That is already common knowledge for most people. However, using your maximum stopping power is NOT the proper thing to do at that moment. Brake gently first and increase the input from there on.