An emission nebula is a cloud of interstellar gas and dust that emits light in different colours. There are several different types of emission nebulae with diverse sources of energy that are responsible for the glowing of gas and dust. Their colour varies depending on the degree of ionisation and the chemical elements of the nebula.H II regions
H II regions (pronounced 'H two') emerge when molecular clouds collapse and form hot and young stars of spectral class O, B or A, the three hottest and brightest types of stars that exist. These newly born stars emit a lot of ultraviolet light that ionises the hydrogen atoms of the surrounding gas cloud, "kicking" (or exciting) electrons to a higher energy level. When such an electron falls back to its original energy level it emits a photon with a specific wavelength of 656.28nm - or in other words: red. Since the predominant component of these star-forming regions is hydrogen, these regions glow in red. They are also called H II regions since H II is the technical term for ionised atomic hydrogen. An H I region is a region with neutral atomic hydrogen; H I regions do not emit light, hence are not emission nebulae.
H II regions have typical temperatures of about 10000 K; far too hot to form new stars. New stars can only be born in the presence of a very cold molecular cloud. Therefore, within a timespan of a few million years, the gas of the H II region will be blown away by the radiation pressure of new-born stars that formed in cooler parts of the nebula... leaving nothing behind but these new stars with their planets. 90% of all the gas and dust of the original molecular cloud will not be used for star- and planet-formation. This material is not lost and can be recycled in the far-distant future in other star-forming regions.Planetary nebulae
In the case of planetary nebulae, the source of energy for ionising the hydrogen atoms is a hot white dwarf, the remnant of a sun-like star that has burned all its fuel. These stars eject their outer layers at the end of their lives, creating a shell of gas around them and at the same time exposing their hot, dense core: the white dwarf. Their surface temperature varies between 4000 K and 150 000 K and these bodies emit enough ultraviolet light to ionise the surrounding gas. These planetary nebulae play an important role in enriching the interstellar medium with heavy elements like oxygen, carbon, nitrogen and calcium, which are indispensable for the formation of planets in future star systems.
Unfortunately the name planetary nebula is very misleading since these nebulae have nothing to do with planets. During the first observation of these objects they resembled Uranus. In 1785 the astronomer Herschel, who observed them, named these - at that time unknown structures - planetary nebulae. Since then the name has not been changed even though we now know that a planetary nebula is an emission nebula, not a planet or a nebula connected to a planet.
Two other types of nebulae that can be observed are supernova remnants and reflection nebulae.