Why do some stars explode as supernovae?

Some stars explode as supernovae when they run out of the hydrogen which they depend on to stay hot. Another way is due to binaries - when a particularly large star, e.g. a red giant, attracts a smaller star due to gravitational pull, and they orbit each other. The star cannot bear the heat and explodes in a massive amount of heat and light - that is how novae happen. A supernova has a much larger effect than a mere nova, and they happen when the star collapses due to reduction of fuel before the spontaneous explosion, and thus causing it to be much larger and brighter.