The classification on time: every stage time is added up, and the rider with the lowest total leads the race.
In a stage race, every rider is timed at each finish. The general classification (usually shortened to "GC") adds those times up day after day.
The GC leader wears a distinctive jersey: yellow on the Tour de France, pink on the Giro, red on the Vuelta. The overall winner is whoever wears it at the final finish.
Gaps are mostly made in the mountains and in time trials; on flat stages the bunch finishes together and the standings barely move.