The reason that stars swell in size after exhausting their hydrogen cores is that the stars begin fusing helium, according to the University of Michigan. The helium releases more energy during fusion than the hydrogen releases during the process. The amount of energy produced by the helium is greater than that needed to stave off gravitational collapse, which causes the star to swell greatly in size.
According to the National Aeronautics and Space Agency, all stars eventually collapse after exhausting their fuel. Small stars become white dwarfs while the very largest stars end their lives as they collapse into black holes. Stars of intermediate mass become very dense objects called neutron stars.
According to Harvard University, during the process of becoming a red giant, the outer layers of the star increase greatly in size while the core contracts in size. Additionally, when the star expands this much, its surface cools considerably. According to Harvard, red giants increase up to 70 times in size before the hydrogen is depleted.
The Earth’s sun is destined to become a red giant eventually. According to the University of Michigan, the sun’s diameter is currently about 1/100th of an astronomical unit. When the sun becomes a red giant, its diameter is sure to grow to over one astronomical unit.