When it becomes hotter than about 30 thousand degrees, ultraviolet light strips electrons from hydrogen atoms in the expanding cocoon around the star. This cocoon, now almost a light year across, starts to glow as a planetary nebula. Famous examples include the ring nebulae in Lyrae, and the Helix nebula. The central stars of planetary nebulae are quite extraordinary objects. Their surfaces can be over 100 thousand degrees.
Some central stars have surfaces in which no hydrogen remains, some have no helium either.
With their original hydrogen stripped away, they are the bare remnants of stellar evolution. These stars have no nuclear fuel reserves left. They cannot become much smaller because the electrons inside them can't be forced any closer together - they are electron degenerate. The carbon-oxygen mixture inside them is no longer a gas like the hydrogen in young stars, but is now a very hot crystalline or metallic solid, at about 100 million degrees. The star is more than ten times smaller than the Sun, but it is still shining 1000 times more brightly.