A dying star’s final moments are captured in this image from the NASA/ESA Hubble Space Telescope. The death throes of this star may only last mere moments on a cosmological timescale, but this star’s demise is still quite lengthy by our standards, lasting tens of thousands of years!
The star’s agony has culminated in a wonderful planetary nebula known as NGC 6565, a cloud of gas that was ejected from the star after strong stellar winds pushed the star’s outer layers away into space. Once enough material was ejected, the star’s luminous core was exposed and it began to produce ultraviolet radiation, exciting the surrounding gas to varying degrees and causing it to radiate in an attractive array of colours. These same colours can be seen in the famous and impressive Ring Nebula, a prominent example of a nebula like this one.
Planetary nebulae are illuminated for around 10 000 years before the central star begins to cool and shrink to become a white dwarf. When this happens, the star’s light drastically diminishes and ceases to excite the surrounding gas, so the nebula fades from view.
Image Credit: ESA/Hubble, NASA, M. Novak
Explanation from: https://www.spacetelescope.org/images/potw1530a/