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
28/08/1996

Will most stars one day look like this? Pictured above is the planetary nebula NGC 5882, captured by the Hubble Space Telescope. Although planetary nebulae can appear similar to planets like Uranus and Neptune, they are actually gas clouds surrounding stars typically hundreds of light years away. Planetary nebula form when a typical star completes fusion in its core and ejects an outer envelope of gas - usually about 10 percent of the star's initial mass. This gas shell dims in about 50,000 years - short compared to the lifetimes of stars. Therefore, although only about 1000 planetary nebula are known in our Galaxy, it is thought that most stars go through this phase. Green light is emitted when oxygen ions acquire electrons from the surrounding gas.