Once the hydrogen stores of a moderately-sized star like our sun are used up, it no longer functions. Its mass contracts, the outer layers get heated and the star expands into a red giant. The increased heat causes the helium in the core to fuse into carbon. When the helium store is depleted, the core cools down and releases some of its material into space, causing the remaining star to form a planetary nebula. Finally the core will be transformed into a white dwarf, followed by a black dwarf, and then it disappears.
If a star's mass is substantial, instead of cooling down once the helium store is depleted, its core will continue to fuse into iron. At that point the star collapses from its weight, heating up the iron so much that its protons and electrons merge into neutrons, producing a contracted neutron core. The extreme heat causes the core to explode and release energy and matter into space, producing a supernova. The dead star's remains become a neutron star and other released matter and gases are absorbed by other bodies in space.
How do I shoot pictures of stars?
Answered by Discovery Channel
How did Earth get a moon?
Answered by Science Channel
What is NASA doing to protect us from asteroid impacts?
Answered by James L. Green