Without sun's existence, there wouldn't be life on Earth. In the grand scheme of things, however, our sun is simply another star among star among the other hundreds of billions of stars in the universe.Officially, the Sun is a class G2V star- in other words,a main-sequence yellow dwarf have a temperature range of 5,000 to 6,000 degrees Celsius and their mass is about 80-120 percent of the mass of the sun. That means that the Sun is one of the biggest yellow dwarfs in the group.
Like other yellow dwarfs, the Sun converts hydrogen to helium in its core through nuclear fusion,which generates massive amounts of energy and light.The Sun fuses about 620 million metric tons (683 million short tons) of hydrogen per sec. Based on the speed, astronomers believes that the sun is about halfway through its life cycle. About 40 percent of the hydrogen has been converted,leaving another 3 to 5 billion years before the Sun evolves into the next stage in its life cycle:a red giant.
But let's start at the beginning.The Sun formed approximately 4-5 billion years ago, at the same time as the rest of the solar system. At this time a spinning molecular cloud of dust, hydrogen and helium flattened out into a disk, With a gaseous sphere at its center that contained most of the mass.This sphere had a gravitational pull that attracted dust and other materials from the disk,which caused the sphere to compress until it begin converting the hydrogen to helium.A star-in this case, Our Sun-was born.
The Sun can't keep fusing hydrogen indefinitely, though - there's a finite supply. Nuclear fusion occurs in the Sun's core due to gravitational pressure, which heats the core to 15 million degrees (27 million degrees Fahrenheit) and splits the hydrogen atoms.There's dedicates balance,known as 'hydrostatic' equilibrium 'between the inward compression exerted by gravity and the outward pressure from the energy created by nuclear reaction.As the Sun's hydrogen supply is used up,the nuclear fusion in its core will decrease, and the core will contract. The core will heat up to a temperature of 100 billion degrees Celsius and begin fusing helium into carbon.The outer layers of the Sun will expand as it become a red giant.This means that the Sun's radius will be 250 times larger than its current radius,and it will swallow the Earth.
Astronomers once thought that because the Sun's gravitational pull will weaken when it becomes a red giant, the associated planetary movement outwards away from the Sun might spare our planet. However, the most recent projections show that Earth would likely still be in the outer layer of Sun,where it will be pulled in and vaporized.Even if the Earth itself is spared,astronomers still believe that the increasing heat from the Sun will eliminate life on Earth about one billion years from now.
Source - How it Works Book and Internet