Once a star has exhausted its supply of hydrogen in its core, leaving nothing but helium, the outward force created by fusion starts to decrease and the star can no longer maintain equilibrium. The force of gravity becomes greater than the force from internal pressure and the star begins to collapse. The results of this collapse depend on the mass of the star.
As mentioned before, the lower a star's mass, the slower the fusion reactions inside it and longer it stays on the main sequence. The smallest stars are known as Red Dwarfs. These stars shine dimly and are estimated to have lifespans of hundreds of billions or even trillions of years. Because scientists estimate that the universe is only about 13.7 billion years old, none of the red dwarfs in the universe are old enough to have actually left the main sequence. They just keep shining with their dim, red light.
When a star around the size of our sun runs out of hydrogen at its core and starts to collapse, the gravitational energy causes the core to heat up again, just like it did when it was a protostar. This increased heat at the core pushes outward, compressing the hydrogen in the outer layers of the star, sparking fusion reactions in this outer shell of hydrogen. This outer shell then begins to expand and cool, turning orange and then red. At this stage in its life, the star is known as a Red Giant. Even though the surface of the star is cooler, the size of the star increases by hundreds of times, making the star appear brighter. This places the star in the top right area of the Hertzsprung-Russel Diagram.
Even though a star may have spent billions of years in the main sequence, the red giant phase will only last a few million years. Eventually, the outward force from the hot core will completely blow away the outer shell of the star, transforming it into a planetary nebula.
When a star is more than ten times as massive as the sun, it becomes a Supergiant star. Supergiants have the shortest lifespans of any star, as the temperatures in a supergiant's core get so high that it is able to fuse the helium that is left over after hydrogen burning has stopped. This helium burning process fuses helium atoms into carbon atoms, which then begin to build up at the center of the core. Helium burning once again creates an outward pressure, stabilizing the core and delaying gravitational collapse.
When a star runs out of helium, its core will start collapsing again until its temperature is high enough to begin fusing carbon. This pattern will continue as the star burns through successively heavier materials: carbon, neon, oxygen and silicon. This gives the star a layered structure, similar to an onion. Eventually, the star will begin to build up Iron in its core. Iron atoms are very stable – so stable in fact that it takes more energy to add more particles to Iron than the energy released from breaking the particles apart in the first place. Thus, once a star's core turns to iron, it has no way to maintain equilibrium, and the star will undergo a sudden and catastrophic collapse...