All stars eventually run out of fuel and die. Most fade away quietly, but the most massive stars self-destruct in a huge explosion that can outshine an entire galaxy.
Massive stars -- Stars over eight times massive then our sun end their lives in strange and violent way The heat and pressure inside the core become so great that nuclear fusion can not only fuse hydrogen atoms together to form helium but can fuse helium and larger atoms to create elements such as carbon or oxygen then it swells to become a Super giant.
The nuclear fusion forces atoms together to form heavier and heavier elements until the core turns to iron when this happens the core no longer exerts enough outward pressure to resist the crushing force of gravity so the star collapses forming a supernova . The star self destructs into an explosion brighter than billion suns its outer layers are blasted into space but the massive core continues to collapse in on itself
if the core is small it turns into a neutron star but a massive core never stops collapsing until its a billion times smaller than an atom.And turns into a black hole
neutron star --up to three times heavier than a sun yet only a few kilometres wide neutron star are unimaginably fast spinning stars.
Black hole-- the force of gravity close to a black hole is so intense that nothing can escape from it not even light.