Stars move on the H-R diagram as they evolve. A star typically begins its life on the main sequence. As it exhausts hydrogen in its core, it leaves the main sequence and becomes a red giant or supergiant. Eventually, it may shed its outer layers and become a white dwarf. The path a star takes on the diagram is mainly determined by its initial mass.