Both black holes and neutron stars are corpses of stars that died in catastrophic explosions known as supernovas, outbursts that can make a star briefly outshine all of the other stars in its galaxy. When a star goes supernova, the core of its remains collapses under the strength of its own gravitational pull.