Diffuse nebulae are clouds of interstellar matter, namely thin but widespread agglomerations of gas and dust. If they are large and massive enough they are frequently places of star formation, thus generating big associations or clusters of stars.
Some of the young stars are often very massive and so hot that their high energy radiation can excite the gas of the nebula (mostly hydrogen) to shine; such nebula is called emission nebula. If the stars are not hot enough, their light is reflected by the dust and can be seen as white or bluish reflection nebula.

When a star like our sun has used up all its central nuclear fuel, it finally ejects a significant portion of its mass in a gaseous shell which is then visible in the light emitted due to high-energy excitation by its extremely hot central star, which previously was the core of the stellar progenitor (thus, planetary nebulae are a special kind of emission nebulae). These nebulae quickly expand and fade while their matter is spread in the interstellar surroundings.

Stars which are considerably more massive than our Sun, and have at least about 3 solar masses left after their giant state, can most probably not evolve quitely into an end state as a white dwarf, but when coming to age, explode in a most violent detonation which flashes up at a luminosity of up to 10 billion times that of the sun, called supernova (of type II) and ejecting the very greatest part of the stellar matter in a violently expanding shell.
Alternatively, infalling matter on a white dwarf star can cause it to explode as a supernova of type I. The nebulous ejecta of supernovae of either type are called supernova remnants.

