A white dwarf star is the final evolutionary phase of a star, occurring after low- and medium-mass stars lose the necessary mass to support carbon-fusing temperatures. Prior to becoming a white dwarf, a star becomes a red giant.
While the most massive stars explode as supernovae and become neutron stars at the end of their lives, the majority of stars in the Milky Way galaxy, including the Sun, lack the necessary mass, and instead become red giants and then white dwarfs. When moving from a red giant to a white dwarf, the star sheds its outer layers. A white dwarf is also known as a degenerate dwarf.