Nib asked, and Nib — askNib's tutor — drew the answer live at a whiteboard. This is the spoken transcript; enable JavaScript to watch it drawn.
what happens when a star dies
A star is not burning like a campfire. Fusion turns hydrogen into helium in its core, and that outward heat holds the star up against gravity.
When the fuel runs low, the balance breaks. What happens next depends on one thing: the star's mass. Most stars never explode at all.
A light star like our Sun swells into a red giant, wide enough to swallow the inner planets, as its core runs out of hydrogen.
Then it blows its outer layers off as a glowing shell. The bare core left behind, a white dwarf, is Earth-sized and cools for ages.
A star over about eight Suns fuses heavier and heavier atoms in layers, up to iron. Iron is a dead end: fusing it costs energy.
With no heat left to hold it up, the iron core collapses in under a second, and the rebound blasts the star apart: a supernova.
The collapsed core becomes a neutron star, a city-sized ball of neutrons. If the star was heavy enough, it becomes a black hole.
So mass is destiny: light stars fade into white dwarfs, heavy stars end in a supernova and leave a neutron star or a black hole.
Every star is a balance between heat and gravity, and when the fuel runs out, its mass alone writes the ending.