This ring is called a planetary nebula. When the last of the helium atoms in the core are fused into carbon atoms, the medium size star begins to die. Gravity causes the last of the star's matter to collapse inward and compact. This is the white dwarf stage. At this stage, the star's matter is extremely dense.
White dwarfs shine with a white hot light.
Once all of their energy is gone, they no longer emit light. The star has now reached the black dwarf phase in which it will forever remain. Once massive stars reach the red giant phase, the core temperature increases as carbon atoms are formed from the fusion of helium atoms. Gravity continues to pull carbon atoms together as the temperature increases forming oxygen, nitrogen, and eventually iron. At this point, fusion stops and the iron atoms start to absorb energy.