departure from the main sequence
For most of its life a star sits comfortably on the main sequence, fusing hydrogen in its core. But that core is a closed pantry — no fresh hydrogen flows in. Slowly, atom by atom over billions of years, the hydrogen is converted to helium until the central fire has nothing left to burn. Departure from the main sequence is the moment the star's middle age ends: the core hydrogen is exhausted, and the star is forced to change in dramatic ways. It is the dividing line between a star's long, steady life and its eventful, often spectacular old age.
Here is what actually happens. With no fusion in the core to push back, gravity squeezes the spent helium core, which heats up. That extra heat ignites hydrogen in a thin shell wrapped around the dead core — fusion moves outward into a layer. Counterintuitively, this shell burning makes the star's outer envelope swell enormously and cool, so the star grows larger, redder, and brighter overall even as its core contracts. On the Hertzsprung-Russell diagram, the star moves off the tidy main-sequence band and marches up and to the right toward the giant region. For the Sun this transition begins in roughly 5 billion years.
Because every star leaves the main sequence at a predictable point set by its mass, the turnoff is astronomy's best clock for star clusters. In a cluster, all the stars are the same age, so the heaviest ones peel off first; the location of the turnoff — the brightest, hottest star still burning core hydrogen — pins down the cluster's age, from young open clusters tens of millions of years old to ancient globular clusters near 13 billion. A misconception is that the star 'runs out of hydrogen' entirely; in fact it has plenty left in its outer layers, but only the core is hot enough to fuse, and it is the core that has run dry.
Astronomers age a globular cluster by photographing all its stars and finding the turnoff — the spot on the H-R diagram where the main sequence bends away toward the giants. A high, bright turnoff means a young cluster; a low, faint one means the cluster has been losing stars to old age for over ten billion years.
The turnoff point on the H-R diagram is the most reliable way to date a star cluster.
Leaving the main sequence is the start of a star's death, not the death itself — what follows (giant phase, mass loss, white dwarf or supernova) can take a long time and depends entirely on the star's mass.