The death of a star depends on its mass. Smaller stars like our Sun eventually exhaust their nuclear fuel and expand into a red giant, shedding their outer layers and leaving behind a dense core called a white dwarf. More massive stars can undergo supernova explosions, leaving behind neutron stars or collapsing into black holes.