A nebula is an interstellar cloud of dust, hydrogen, helium and other ionized gases. Historically, a nebula was the name given to any diffused astronomical objects, including galaxies beyond the Milky Way. Today, the true nature of a galaxy is confirmed and this is no longer referred to as a Nebulae. Nebulas are star-forming regions. Gas, dust and other materials “clump” together to form larger masses, which attracts further mater and eventually will become massive enough to form stars.
Nebulas are formed by the gravitational collapse of gas in the interstellar medium. As the material collapses under its own weight, massive stars may form in the center and their ultraviolet radiation ionizes the surrounding gas, making it visible at optical wavelengths.
Nebulas may also be formed as planetary nebulae. This is the final stage of a low-mass stars life, like the earth’s sun. Furthermore, stars with a mass up to 8 – 10 solar masses will evolve into red giants and slowly lose their outer layers during pulsation. When the star has lost enough material, its temperature increase and the ultraviolet radiation it emits can ionize the surrounding nebula that has thrown off. A nebula is 97% hydrogen, 3% helium and trace amounts of other elements.