The word “nebula” usually refers to any patch that glows diffusely. That is to say that a nebula has the smooth appearance resulting from diffuse gas as opposed to stellar content. 

Until their true nature was understood, galaxies were referred to as nebulae because individual stars were difficult to resolve in them.  Two common types of nebulae are associated with ends of stars’ lives. When the core of a high mass star collapses, a supernova explosion can result. This disruption of the star can leave behind a supernova remnant nebula. 

Nebulae from relatively recent supernovae, such as the Crab, can be seen as compact glowing regions. The gases from more ancient supernovae will have expanded to a greater extent and become far more tenuous and filamentary.  The Cygnus Loop is a wispy example that may be about 25,000 years old. Lower mass stars will often eject their outer shells of hydrogen gas near the ends of their lives.

The hot core of the star, now known as a white dwarf star, is left behind cooling while the outer layers of gas expand into space. These objects are known as planetary nebulae. They are quite common. Other nebulae may be reflection nebulae, emission nebulae or a combination of the two. Reflection nebulae show the continuous emission of nearby stars scattered by dust within the nebula.  Emission nebulae show line emission from the gases of the nebulae themselves. As in the case of the Great Orion Nebula, these Nebulae are often associated with regions of recent or ongoing star birth.