A supernova is an incredibly bright explosion that most people associate with the death of an old star when there isn't enough 'fuel' left for nuclear fusion to fight the effects of gravity, but supernovae can transpire from a variety of different situations.
One example is when a white dwarf 'steals' too much matter away from a nearby star. When this happens, the white dwarf becomes overwhelmed with instability and collapses, triggering a supernova.
Another example takes place when two white dwarfs drift too close to one another amid a binary orbit. When this happens, the two collide in space and explode into a massive supernova.
While the three methods above are some of the most common, it's also possible for a star to exhibit what's called a fast-evolving luminous transient. When this happens, a star spews heaps of dust and gas before exploding.
Supernovae captivate astronomers; unfortunately, they're difficult to predict and study in detail. Nevertheless, we do get lucky sometimes, and that's why we know everything about supernovae that we do today.