All stars (such as our Sun) are created from collapsing clouds of gas and dust called nebulaes.
After millions of years these nebulaes settle and form protostars.
Once nuclear fusion starts gappening, the protostar is going to evolve into a red giant. Our Sun is currently a red giant. For a very, very long time, this red giant will burn hydrogen to live.
Once the planet has run out of hydrogen, it devolves into a white dwarf. As a white dwarf, it is much smaller and dimmer thatn a red giant.
The outer radiation and emissions of the white dwarf is called planetary nebulae.
If the white dwarf collapses, the explosion and its remains are called supernovas.
When a supernova collapses, it can evolve into a black hole, which is a point where gravity is so strong, it even absorbs light!
Fun Fact! If you to go into a black hole and survive, you would be stretched like a spaghetti!