The Sun is the Star at the center of the Solar System. It is nearly a perfect sphere of hot plasma. It is heated to incandescence by nuclear fusion reactions in its core. It radiates energy mainly as light and infrared radiation. It is by far the most important source of energy for life on Earth. It has a diameter of about 864,000 miles. This is 109 times that of the Earth. It's mass is about 330,000 times that of the Earth. The Sun accounts for 99.86% of the mass in the Solar System. About three quarters of the Sun's mass consists of Hydrogen, the rest is mostly Helium, with some small quantities of heavier elements, such as oxygen, carbon, neon and iron.
The Sun is a G-type main sequence star. Thus, it is informally referred to as a "yellow dwarf." Despite its light being closer to white than yellow. The Sun formed approximately 4.6 billion years ago from the gravitational collapse of matter within a region of a large molecular cloud. Most of this matter gathered in the center. The rest flattened into an orbiting disk that became the rest of the Solar System. This central mass became so hot and so dense that nuclear fusion in its core became initiated. It is actually believed that most stars form by this process.
At the Sun's core, about 600 million tons of hydrogen are fused into helium every second. This converts 4 million tons of matter into energy every second. This energy takes between 10,000 and 170,000 years to escape the core. This energy is the source of light and heat for the Sun.
It is calculated that, eventually, the Sun will become sufficiently large to engulf the orbits of Mercury and Venus. It will also render the Earth uninhabitable. This will not happen for another 5 billion years.