The Life of the Sun
All stars are thought to form from interstellar gas clouds. The gravitational attraction between the atoms within the cloud gradually, over millions of years, draws the atoms toward one another so that the cloud collapses. As it collapses, the gases in the cloud are compressed and grow hotter, eventually turning into the glowing sphere we see today.
At its birth, the Sun was much larger than it is now, but gravity made it shrink still more. During that epoch, the Sun was heated by gravitational energy released as it grew smaller. Eventually the Sun's core grew hot enough for nuclear reactions to supply its energy by converting hydrogen into helium. Our Sun continues to derive its power in that way even today, and will continue to do so for about another 5 billion years.
The animation below shows how the Sun converts hydrogen into helium.
Over the next 5 billion years, the Sun will use up all the hydrogen fuel in its core. With no more core fuel to "burn", the Sun will adjust its structure. Its core will shrink and its outer layers will expand and grow cooler. In fact, at that time, far in the future, the Sun will swell up to about 100 times its present size, nearly engulfing the Earth.
To see these changes in the Sun's life, and more, click below.