Stars die in beauty.
Stars generate energy in their cores by fusing hydrogen into helium, like a controlled hydrogen bomb. This energy moves outward from the core through the upper layers of the star, then leaves it as light.
As time goes on, inert helium builds up in the core. As more piles up the core contracts, getting very hot. When this happens with a star like the Sun (from roughly 0.8 to 8 times the Sun's mass), various complicated things happen in the core, heating it up further. The outer layers respond to this extra energy by swelling up like a hot air balloon. The star expands, becoming hundreds of times larger. It also cools, turning red. We call such a star a red giant.
The gas in the upper part of the star starts to blow away in a wind of particles. Eventually it all blows away and the core of the star is exposed. It blasts out ultraviolet light, which excites the gas, causing it to glow. This structure is called a planetary nebula.
Planetaries can have all kinds of fantastic shapes. Some are highly elongated with a narrow, pinched waist, and a thick disk or enhanced ...