This massive star is near the end of its life. It has been casting off its outer layers in a strong stellar wind, and now the star's hot, exposed innards are ionizing the gas, making it glow. The different colors are created by gas of slightly varying composition.
The colorful structure, named NGC 6302, is termed a planetary nebula, derived from the fact that in small telescopes an object like this can look like a planet.
The picture was taken in 1998 with the European Southern Observatory's Very
Large Telescope. NGC 6302 is also called the Butterfly Nebula. It is visible
from the Southern Hemisphere.
The central star is obscured by an edge-on disk of dust. In a few thousand years, it will fade and become a white dwarf.
Credit: ESO/VLT