After a star exhausts the hydrogen in its core and passes through the red giant phase, low to medium mass stars (like our Sun) shed their outer layers and become white dwarfs. A white dwarf is the hot, dense core remnant that slowly cools over billions of years.