Red Flags are used when Safety Cars are not enough of a safety precaution following an on-track incident.
As well as giving drivers the chance to change to fresh set of tyres and potentially gain track position, red flags are in place to make sure that the drivers do not race in conditions that are just too dangerous.
Red flags are typically seen when after an accident in which there is an incredible amount of debris on the track that should not be driven around even under a safety car. Or when one of the barriers is so damaged following a crash that it cannot absorb impacts efficiently, or during a wet race when there is so much standing water on the track that it is too dangerous to continue. At such point the race is suspended. Red Flags do count towards time limits in races.
During the Red Flag period, the drivers line up in position order in the race in the pit lane to await a restart. The race will only be restarted once the stewards and marshals deem that it is safe enough to resume racing.
Once the race is restarted, it will be restarted behind the safety car, and the race will then be resumed either with a standing start or a regular safety car restart.
If it is thought that it is too dangerous to resume the race, or that there is no point due to a lack of remaining laps in the Grand Prix, then the session will be abandoned. Should it be abandoned before the race is halfway completed, then half points will be awarded.
Red Flags can also be used in Practise, Qualifying and Test Sessions. The cars will then return to their garages at a very low speed, before being allowed back out once the danger is cleared. Again, if there is not enough time left in the session or it is too dangerous to continue, the session will not be restarted.