In racing each and every car wants to be on the narrow racing line. Overtaking becomes a strategic game of planning the passing point well ahead.
Since the racing line is so narrow the only chances you have at overtaking are on the straightaway, or upon entering corners.
Overtaking upon corners:
You can win the battle for position by trying to outbrake the competition before the corners. This means that the chasing car tries to brake a little later than the opponent. The opponent is forced off line and is forced to take the slower line.
If you brake too late you will initially overtake the one in front. But you wont be able to make it onto the late apex line, as you'll be pushing the car towards the outside line, forcing you to hold back on the throttle. And while you are struggling with the throttle, the car you just passed is almost, or already giving it full throttle, retaking the lead on the inside.
Overtaking on a straightaway:
As soon as you manage to lock-on to your opponent in the range of about 25 yards, you feel getting sucked in closer. Why?
This phenomenon of getting sucked in is called draft, or slipstream. The higher its speed, the more air a car has to fight through. If the car in front of you is fighting the air for you, you will have to resist much less air. As a result you get more speed for the same amount of work that the engine delivers. Once youre close enough simply pick the right moment to pass your opponent.
STOCK CARS FORM A PACK TO REDUCE WIND RESISTANCE
As you possibly know NASCAR racing involves making good use of the slipstream. The same applies to the famous Le Mans 24h races that go well over 200 mph. But for F1, you dont see F1 drivers making much use of the technique, now do you? This is because F1 cars employ very sophisticated aerodynamics. Its not just creating a draft, the heavy downforce from the rear spoiler also create turbulence in the air behind.
So they can gain speed by driving behind one another, but since it will trigger unreliable balance for the trailing car you wont see this very often.