Not even stars can live forever
Recall, there is a delicate balance going on between gravity and nuclear reactions occuring in the stars core to keep a star in hydrostatic equilibrium. As the hydrogen at the core is slowly converted to Helium, the star must compensate for the reduced fuel by burning hotter in the center. This increased radiation from the center, pushes the outer envelope of the star outward, causing it to cool. How does a star track on the HR diagram if it becomes both more luminous and cooler (as seen from the outside?).
Early and Midlife Evolution of stars 8 Msun > M > 0.4 Msun (like our Sun)
We see stars from the outside. Below is a diagram showing the evolution of our Sun as seen from its outside:
However, the cause for the evolution seen outside is driven by what's happening inside. Inside the central core, Hydrogen is being fused to Helium. Presently, our Sun is in middle age: about half its Hydrogen fuel has been converted to Helium. In a few billion years, the core will collapse in response to the reduced fuel supply, and heat up. As the center collapses, regions outside the core are now able to fuse H to He and the will begin hydrogen shell burning.
Shell burning generates more energy than when it was core fusion only, pushing out the outer atmospheric layers into a Red Giant phase. The Sun will now be bigger than Mercury's orbit, and possibly Venus's. The Earth will be scorched as the Sun gets redder and bigger.
Finally, the collapsing, hot core ignites into Helium fusion into Carbon. In low mass stars, it happens suddenly, in a Helium Flash.
What happens after Helium fusion begins in the core depends on the mass of the star. We will go over several different end stages for stars, dependent on the initial mass of the star.