Racing. There's more to it that just going as fast as you can. Sometimes you're stuck behind a car that isn't going as fast as you. When should you overtake? The next corner? (No). Well, that's an unanswerable question. It depends. Assuming the driver in front doesn't immediately make a mistake you're going to have to follow for a little bit, assess the situation.
The trick with following is pretty simple. Following is about not hitting the car in front. When you do, following becomes crashing, and no one wants to be crashing.
When following, there will always be a reaction time between when the driver in front hits the brakes and when you hit your own brakes. In a series where you can see brake lights it's much easier, because their actions are obvious. If you see red lights you need to be braking too.
If you're following closing, as in 0.2 seconds behind, you really cannot be relying on seeing their brake lights before you hit your brake lights, or chances are, that basic 0.2-0.4 human reaction time will mean you'll wipe out both yourself and the car you are following.
The trick is to know your own reaction time and know their braking points. Once you know that you brake earlier than the car in front, but only just enough such that you're both braking at pretty much the same time.
It's a bit more complicated in the online world, where latency comes into play. If you've got a 400ms latency, then you've got problems following closely, for hopefully obvious reasons. You'll still have to get a feel of the situation and leave enough time such that you both are braking at the near the same time.
There it is, pretty simple. If you can remain close enough to the car in front you can use this to pressure them into a mistake, making your pass easier.
If you're following another car closely, BRAKE EARLIER THAN YOU NORMALLY WOULD.