Qualifying decides the order in which cars line up on the grid for the race. The standard format is a three-stage knockout, with the slowest cars eliminated at the end of each stage and their grid positions fixed by their best time.
In the first segment, Q1, every car takes part. Drivers set their fastest lap they can, and the slowest group at the end is knocked out; those drivers fill the back rows of the grid in the order of their Q1 times.
The survivors go through to Q2, where the process repeats: another group of the slowest cars is eliminated and takes the next block of grid slots. The remaining fastest cars advance to Q3, the final shoot-out for the top positions.
In Q3 the quickest drivers fight for pole position — the very front of the grid — and the rest of the top order. The driver with the single fastest lap in Q3 starts first. Because tyres, fuel loads and track evolution all change across the session, qualifying is as much about timing your run as raw speed. Note that grid penalties applied afterwards, for things like power-unit component changes, can shuffle the final starting order.