As with all life in the Cosmos, the ending depends largely on the life that was led.
The death of a star, as with its life is equally dependent on it size. Smaller stars tend to die with a whimper, shedding it outer layers until only a dark core is left. Larger stars have a more dramatic cycle just as they have a more dramatic life.
When a star runs out of nuclear fuel it begins to collapse under gravity as it did during its birth. This collapse causes an increase in temperature that causes the star to burn helium and temporarily push outward. The star will expand tens of times its original size and in the case of our sun all the inner planets will be consumed. Simultaneously, large sections of its surface are blown into space until the gravitational forces overcome the reduced thermal forces and implosion begins anew. The mass is insufficient to overcome electron degeneracy and no further collapse can occur. Electron degeneracy, the fact that no two electrons may occupy the same space at the same time, determines the final size of the remaining core.
Larger stars have a far different result. This first stage is much the same but once the H2 and He fuel is consumed the star will start to burn Carbon. In some cases extremely massive stars will continue to burn Oxygen, Neon, Magnesium, Silicon and Sulfur but all must stop at Iron. The energy needed to burn these heavy elements creates internal temperatures that will swell the star to millions of times the size of our sun. Yet, as long as the internal pressures equal gravitational forces the star will remain in equilibrium. Unfortunately, the burning process of C, O, Ne, Mg, Si or S produces Fe and that decreases the amount of energy released in the star. As the energy drops the temperature decreases and rate of compression by gravity increases. Eventually the fuel must run out and gravity will win. The massive Red Giant will rapidly collapse on itself until neutron degeneracy occurs in the core. At that point the collapsing material will “bounce” off the neutron core in a massive stellar event – the super nova. What happens to the core is discussed in Black Holes Space/Time Distortion.
Once the debris, these heavy elements of Carbon to Sulfur that were created inside the star, are thrown into interstellar space by the forces of the super nova, the cycle is set to begin again. Any dying star expels its material into space; however, the debris of super novae tends to gather rather quickly. In cases like the Crab Nebula, the super novae remnants and the actual nebula are difficult to distinguish. These elements become the dust and gas that is the material needed to produce new stars. The Circle of Life is complete!
Related Articles:
Black Holes Space/Time Distortion
Supernova Destroys Star Rho Cas
Andromeda the Milky Way versus Sol