After a red giant has used up its helium, its outer layer is thrown off into space.
The jettisoned shell, made up mostly of hydrogen, is called stellar wind.
The star’s deeper layers form an expanding shell, about 0.5 to 1 light-year wide, known as a planetary nebula.
Early astronomers wrongly thought that these masses were protoplanets, hence the adjective “planetary.”
The planetary nebula expands and dissipates quickly, leaving the core behind as a white dwarf.