As previously stated each subsequent stage of nuclear burning in the core produces less energy per reaction than the previous stage. Therefore the reactions occur at an increasing rate to maintain the energy output. This results in a quicker expenditure of fuel at each stage. When all of the core material has been converted into iron this signals the death of the star because the nuclear fusion of iron atoms consumes energy rather than releasing it. Therefore the star cannot burn iron to produce the energy required to support the core. The star will end its life in a spectacular explosion called a supernova. A star that may have existed in a fairly stable state for millions of years as a supergiant will end its life in a process that takes seconds!
At the start of the collapse the core would have been about the size of the earth with a density of about a hundred thousand kilogrammes per cubic centimeter. About one second later after collapsing inward at about a quarter of the speed of light it will be about 100km in diameter with a density of around a hundred billion kilograms per cubic centimetre! The contraction continues until the density of the core is the same as that of an atomic nucleus about 240 billion kilograms per cubic centimetre! The diameter of the core will now be only about 10 km. At this point the core consists almost entirely of neutrons and the contraction is almost instantaneously halted by a phenomena called neutron degeneracy pressure. The core contraction "overshoots" then bounces back and the infalling gas (travelling a rate of up to 700,000 km-s or 150 million miles per hour!) abruptly hits this rebounding core. This sends a supersonic shockwave travelling outwards from the core. A fraction of a second later the outgoing shockwave is halted for a brief instant by an equal mass of infalling gas from the outer layers of the star. At this point a tiny fraction of the neutrinos created by the core reactions interact with the extremely dense region where the material is being compressed by the infalling gas and the outgoing shock wave. The energy from the neutrinos over comes the energy of the infalling material and the shockwave again travels outward, now at an accelerated rate. A few hours later the shock wave reaches the surface of the star travelling at a speed of 1/10th of the speed of light resulting in the explosion of the star.
As the shockwave travels out through the outer layers of the star the tremendous heat produces explosive nuclear reactions in which heavier elements are produced. The supernova explosion expels the elements produced during the stars lifetime out into the interstellar medium.
The energy that is released during a supernova explosion is greater than the energy produced by 100 suns over their entire main sequence lifetime. The energy released is in the order of 1046J. At least 99.9% of this energy is carried away by neutrinos. However about 1042J are given off as light resulting in the stars luminosity increasing by one hundred million times! The supernova can outshine the entire galaxy in which it is located! If it were located in our own galaxy it could be visible for several weeks during the day.