A supernova happens where there is a change in the core, or center, of a star. A change can occur in two different ways, with both resulting in a supernova.
The first type of supernova happens in binary star systems. Binary stars are two stars that orbit the same point. One of the stars, a carbon-oxygen white dwarf, steals matter from its companion star. Eventually, the white dwarf accumulates too much matter. Having too much matter causes the star to explode, resulting in a supernova.
The second type of supernova occurs at the end of a single star’s lifetime. As the star runs out of nuclear fuel, some of its mass flows into its core. Eventually, the core is so heavy that it cannot withstand its own gravitational force. The core collapses, which results in the giant explosion of a supernova. The sun is a single star, but it does not have enough mass to become a supernova.