An optical illusion.

Any individual hair either keeps its color or has turned white. It does not gradually change from full color to white.

However, in most people not all hairs lose their color at the same time. The overall color of one's hair only appears gray for the same reason a computer bitmap appears as a continuous image.

The human mind combines the various colors into a shade of gray. When few individual hairs are white and most are brown, the person appears "graying".

As more and more individual hairs turn white, the person's hair appears more and more gray. When finally most hairs turn white, the illusion disappears, and the person's hair appears (and is) white.

In redheads, of course, the illusion is different. As individual hairs turn white, the overall effect is of a lighter shade of red.

That is why many people believe that redheads don't gray. Strictly speaking that is true because strictly speaking no one grays. But that does not mean that redheads' hair does not turn white with age. It is just not as obvious with redheads as with brown-haired people.