A planetary nebula is an astronomical object consisting of a glowing shell of gas and plasma formed by certain types of stars at the end of their lives.
They are in fact unrelated to planets; the name originates from a supposed similarity in appearance to giant planets.
They are a short-lived phenomenon, lasting a few tens of thousands of years, compared to a typical stellar lifetime of several billion years.
About 1,500 are known to exist in the Milky Way Galaxy.
Planetary nebulae are important objects in astronomy because they play a crucial role in the chemical evolution of the galaxy, returning material to the interstellar medium which has been enriched in heavy elements and other products of nucleosynthesis (such as carbon, nitrogen, oxygen and calcium).
In other galaxies, planetary nebulae may be the only objects observable enough to yield useful information about chemical abundances.