
When the star has run out of hydrogen fuel to fuse into helium within its core the core will begin to collapse and heat some more.
To counter the core's collapse the outer envelope expands causing the temperature to drop at the surface but also increasing surface area and thereby the luminosity of the star. Within the core temperatures will rise to begin fusion of helium into carbon. A shell around the core will rise to such a temperature as to ignite further hydrogen fusion in that region of the star. The helium produced falls onto the core where it can be used as fuel.
This time in the life of a Red Giant is very short compared to the main sequence lifetime, only a few million years. When this stage ends, the star will shed its outer layers and become a planetary nebula, and at the center of it will be a White dwarf.
Earth's Sun[]
As the Earth's Sun is of one solar mass, it is expected to become a red giant in about five billion years. It will become sufficiently large to engulf the current orbits of some of the solar system's inner planets, possibly including the Earth's. The gravitational pull of the Sun will have weakened by then due to its loss of mass, and it is possible that the Earth may escape to a wider orbit. The fate of the Earth with regard to the size of the expanding Sun is still hotly debated in the scientific community. Mercury and Venus will almost certainly be swallowed up by the Sun when it turns into a red giant. If the Earth does escape, it will be due to tidal acceleration.
Characteristics[]
A red giant star reaches sizes of about 100 million to 1 billion kilometers / 62 million to 621 million miles in diameter, or 100 to 1,000 times the size of our Sun.
Since a red giant star’s energy spreads across a larger area, its surface temperatures are cooler, reaching only 2,200 to 3,200°C / 4,000 to 5,800°F, a little over half as hot as our Sun.

Because of this change in temperature, the star begins to shine in the redder part of the spectrum, leading to the name red giant, though they are often more orange in appearance.
Red giants stars remain in this stage from a few thousand to 1 billion years. They eventually run out of helium in their cores and thus fusion stops.
This causes the star to shrink until a new helium shell reaches its core. When the helium ignites, the outer layers of the star are blown off in huge clouds of gas and dust known as planetary nebulae. These shells are much larger and fainter than their parent stars.
The Future[]
Red giant stars live for many years, and we don’t have to worry about them. However, in approximately 5 billion years from now, a red giant will emerge quite close to us.
Our Sun will actually become a red giant star. When this will happen, the Sun will expand its outer layers and consume Mercury, Venus, and eventually the Earth.
Refrences[]
https://nineplanets.org/red-giant-star/
https://www.cs.mcgill.ca/~rwest/wikispeedia/wpcd/wp/r/Red_giant.htm