The two types of stars that end with supernovae are white dwarfs and massive stars that are at least eight times the mass of the sun. Each of these types of stars undergoes a thermonuclear reaction at the end of its life.
Before a massive star explodes in a supernova, it becomes a red giant. The star enlarges but the core condenses. Eventually the core depletes the materials it needs to continue the nuclear fusion process, and the intense heat combines with the iron atoms and gravity to create an explosion that sends radioactive shock waves throughout the material of the star and space. A white dwarf star that is next to a red giant that undergoes a supernova and increases its mass due to the radioactive matter also explodes in the same manner.