The sun is mainly made up of 75 percent hydrogen and 25 percent helium by mass; the sun's is also composed of less than 0.1 percent various metals and elements, including neon, iron, oxygen and carbon. These atoms form hot plasma that is interwoven with the sun´s magnetic fields.
Scientists think that the sun was formed around 4.5 billion years ago due to the gravitational collapse within a large molecular cloud. When this occurred, most of the matter collapsed to the center; the rest became the solar system.
The core of the sun became dense and hot, with thermonuclear fusion occurring in much the same way that it occurs with the formation of other stars. Although people see the sun as yellow, it is actually white. In its core, the sun fuses around 620 million metric tons of hydrogen each second. It generates its energy via nuclear fusion of hydrogen nuclei turning into helium.
The sun's temperature is around 10,340 degrees Fahrenheit. It has not changed very much in the past four billion years, and scientists predict that it will not change much for at least that much longer. Still, the sun is poised to undergo major changes after that time, when the hydrogen fusion at its core stops.