A planetary nebula is a huge shell of gas and dust ejected during the last stage (red giant) of the life of a medium star. Elements such as helium, carbon, oxygen, nitrogen, neon and smaller amounts of heavier elements are present. Planetary nebulae play an important part in the chemical evolution of the galaxy, allowing these elements to be returned to the interstellar medium. The remains of the carbon core of a red giant evolve into a white dwarf star. The Eskimo Nebula in Gemini is a good example.
Acknowledgement: Andrew Fruchter (STScI) et al., WFPC2, HST, NASA