A nebula is a giant cloud of gas (mostly hydrogen and helium) and cosmic dust situated between stars in the interstellar medium. Nebulae serve as sites of stellar birth and death—including emission nebulae that glow from ionized gas, reflection nebulae that scatter starlight, and dark nebulae that obscure background stars.
Source: science.nasa.gov
09/08/1998

What happens when a star runs out of nuclear fuel? The center condenses into a white dwarf while the outer atmospheric layers are expelled into space and appear as a planetary nebula. This particular planetary nebula, designated Shapley 1 after the famous astronomer Harlow Shapley, has a very apparent annular ring like structure. Although some of these nebula appear like planets on the sky (hence their name), they actually surround stars far outside our Solar System.