M27 planetary nebula.

The Dumbbell Nebula M27 was the first planetary nebula ever discovered.

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.