A planetary nebula is formed after a medium size star, like our sun, runs out of fuel and blows off its outer layers creating a cloud that resembles a ring. The core becomes very hot and glows in the center. Though, these nebulas are called planetary nebulas they have nothing to do with planets. Two hundred years ago William Herschel called these clouds planetary because they were round like a planet. The Helix nebula is the closest nebula to earth at a distance of about 655 light years.
Helix/Eye of God Nebula