Like a blue saphire on black velvet, M57 is the prototype of a planetary nebula. The name comes from the planetlike appearance, though the origin has nothing to do with a planet at all.
Actually a planetary nebula is the last stage in a sunlike star's life, which sheds off its outer layers after the fusion process in the interior has stopped and the hot core is exposed as a "white dwarf". The strong radiation of the old core excites the rarified gases of the former outer shell, which start to glow at their typical spectral emission lines ( red - hydrogen, blue - oxygen etc.)