A main sequence star burns through the hydrogen in its core, reaching the end of its life cycle. At this point, it leaves the main sequence. Stars smaller than a quarter the mass of the sun collapse directly into white dwarfs. When stars run out of hydrogen, they begin to fuse helium in their cores. This is when they leave the main sequence. High-mass stars become red supergiants, and then evolve to become blue supergiants. It's fusing helium into carbon and oxygen.