When stars with a mass between 1.4 and 3 times that of the Sun run out of fuel for nuclear fusion, they collapse in on themselves very rapidly. Eventually, the gravity is so strong that all the electrons in the star’s atoms fall into the nuclei and combine with the protons, leaving a massive ball of neutrons. This ball is solid, and so any remaining matter that was falling inwards bounces back out in a violent explosion of matter and energy that can outshine an entire galaxy. This is a supernova.
A number of supernovae have been seen from Earth. The Crab Nebula was observed by Chinese astonomers in 1054!