A hot bright star blows up when it runs out of fuel.
Here's why that happens. The force of gravity is always pulling the matter in the star toward the center. But in that center, small bits of matter called atoms are always fusing together, making bigger atoms and releasing huge amounts of energy. That energy pushes outward and works against the gravity during the star's life. After many millions of years, the star runs out of small atoms. Then it has no more energy to push outward. The star collapses, and when the matter collides in the center, it explodes.
Photo by: NASA/JPL-Caltech