supernova is the last gasp of a dying star.
A star is driven by two basic forces: gravity and pressure. Gravity tries to squeeze a star as tightly as possible. This causes tremendous heat and pressure in the center of the star, which is great enough to ignite fusion in the star’s core. For most of a typical star’s life hydrogen and helium are fusing in the core, which creates enough pressure to balance the weight of gravity.
There are two main ways that hydrogen and helium can fuse. The first is known as the p-p (or proton-proton) chain, where hydrogen nuclei (protons) fuse into helium nuclei. The second is known as the CNO cycle, which stands for carbon-nitrogen-oxygen. In this process hydrogen can fuse with carbon to produce nitrogen, and with nitrogen to produce oxygen, and with oxygen to produce carbon and helium. As a result, the CNO cycle fuses hydrogen into helium and a bit of carbon, nitrogen and oxygen. Stars are mostly hydrogen and helium, so for most of a star’s life it fuses hydrogen into helium in these two ways, and the heat and pressure generated by the fusion balances the weight of gravity. A star in this phase is known as a main sequence star.
It turns out that the p-p chain is easier for a star to achieve, but the CNO cycle produces more energy. This is why main sequence stars (including our sun) gradually increase in temperature. A young star around the mass of our sun is largely driven by the p-p chain, but over time, as more hydrogen is converted to helium the CNO cycle becomes more common. As the star gradually shifts the from lower-energy p-p cycle to the higher energy CNO cycle, the star gradually gets hotter.
Of course eventually a star will have fused most of its hydrogen into helium. As the star’s core runs out of hydrogen fuel, its pressure and temperature will drop, and gravity is able to compress the star a bit more. What happens then depends on the size of the star.
For a sun like star, the further collapse of the star triggers helium to start fusing into higher elements. The process can get a bit complicated, but basically helium fuses at higher temperatures and can produce more energy. The core gets hot enough that the outer layers of the star are pushed outward. As a result, the star swells into a red giant. During the red giant stage about half the star’s mass can be lost out into space. Eventually, the helium will stop fusing, and the remaining mass of the star will again collapse inward.
A star the size of our Sun can’t really fuse elements higher than helium. So when its helium runs out it can’t generate any more energy in its core. Gravity can squeeze the mass of a star into a tightly packed mass known as a white dwarf. A white dwarf has the mass of a star, but it about the size of the Earth. Gravity has squeezed the star smaller and smaller, but there is a limit.
Atoms are basically small nuclei (protons and neutrons) with clouds of electrons surrounding them. Electrons need a certain amount of space, and if you try to push them into a smaller space, they push back (this effect is often referred to as the Pauli exclusion principle). So as gravity squeezes the remains of a star more tightly, it reaches a point where the electrons push back, preventing gravity from squeezing any further. Gravity and the electrons reach a stalemate.
But there’s a limit to how strongly the electrons can push back. This means there’s a limit to how much mass a white dwarf can have. If a white dwarf has a mass about 40% greater than that of our Sun, then its gravity is strong enough to overpower the electrons. Gravity can actually squeeze the electrons into the protons, so that the star basically becomes a giant mass of neutrons. The star then collapses down to a diameter of tens of kilometers, becoming a neutron star. If the star is massive enough, gravity can even collapse the neutrons, creating a stellar-mass black hole.
Large stars can fuse helium into higher elements, so at their end of days they can fuse higher and higher elements, thus delaying the inevitable. But fusion only gives you energy for elements up to iron. If you try to fuse elements higher than iron it actually costs you energy. And this causes a star to end with a bang. As the core of a massive star fuses higher and higher elements, it reaches a point where it starts to fuse iron into higher elements, but this costs energy, so the temperature and pressure of the core plummets. It drops so quickly that the outer layers are basically in free fall. The core collapses, and the rest of the star starts to follow.
When matter reaches the core of the star, two things happen. The first is that iron and other elements fuse into higher elements. All the elements beyond iron, everything past element 26 on the periodic table, was produced during the core collapse of some star. The second is that the very center of the core is compressed into a sea of neutrons (basically a neutron star) and the neutrons push back. The neutrons push against the outer layers of the star with such force that the star rips apart in a massive explosion. You can see a simulation of such an explosion in the figure below.
The result is a supernova. For a brief period the star shines as bright as a galaxy. Great quantities of heavier elements are tossed outward into space. And all that remains of the star is a neutron core.
Only large stars can become a supernova through the collapse of its core, but there is a way for a Sun-like star to become a supernova. This type of supernova is less common. It involves an interesting dance with another star, and when it explodes it tells us just how far away it is.