The Sun will eventually exhaust its nuclear fuel and expand into a red giant before shedding its outer layers. The remaining core will become a white dwarf, a dense Earth-sized remnant that slowly cools over billions of years. Neutron stars and black holes form from much more massive stars.