Composition
The sun, like other stars, consists of a mass of hydrogen atoms. Hydrogen is the most basic element in existence. Hydrogen atoms consist of one proton and one electron. Other elements such as helium, lithium, beryllium and the rest come from the combination of hydrogen. The sun consists of 75 percent hydrogen and 25 percent helium and the heavier elements.
Nuclear Fusion
Nuclear fusion, the combination of hydrogen nuclei into helium, occurs in the core of the sun. It requires heat of millions of degrees Kelvin and intense pressure from the outer layers of the sun. Pressure causes the particles to compact; when combined with the movement from heat it gives the particles enough kinetic energy to override the electromagnetic force. The electromagnetic force normally prevents like-charge particles from ever coming close enough to combine under the strong nuclear force.
First, two protons collide to make a deuteron, or pair of protons, releasing a positron, or anti-charged electron. This positron makes contact with an electron and annihilates in an anti-matter reaction, leaving behind a pair of photons, or light particles. This reaction releases nuclear binding energy, although the process is not fully understood.
Temperature and Energy Output
The center of the sun reaches temperatures of up to 1.5 million degrees Kelvin, and the surface of the sun is approximately 5,000 degrees Kelvin. It produces 3.8e26 joules of energy per second, and the Earth receives 1.8e17 joules of this energy.
Time Frame
Although the sun produces vast amounts of energy, it is in no danger of running out any time soon. It has been burning for 5 billion years and has enough hydrogen left to last 5 billion more. After this time, the sun will begin fusing helium into carbon and the heavier elements, ending with iron; it will last for 10 billion years before collapsing into a white dwarf.