M57, the Ring Nebula, is a planetary nebula. Planetary nebulae are caused when an old, hot star blows off it's outer shells in a massive explosion. The core of the star remains in place and continues to emit light, thus lighting the gases and material as it floats away. In the image above, you can see the 'ring' of outer material and the small central star in the middle. The Ring Nebula is about 2000 light years away and is contained within our galaxy.