The Sun is a big atomic furnace that works by converting hydrogen into helium. Hydrogen is the lightest and most abundant element in the universe. It has one proton in its nucleus. Temperatures and densities in the center of the Sun are so great that hydrogen nuclei fuse into helium nuclei.
The creation of each helium nucleus requires four hydrogen nuclei. One helium nucleus has 99.3% of the weight of four hydrogen nuclei. This excess of 0.7% of hydrogen mass compared with helium mass is converted into energy:
In perspective, the Sun converts 600 million tons of hydrogen into 596 million tons of helium every second. The extra 4 million tons is converted into energy. The energy is so great that the Sun gives off 40,000 watts of light from every square inch of its surface. Compare this to the 60 and 100 watt light bulbs we use in our homes. As far as we know, the Sun has been giving off this light steadily for the last four and one half billion years, and will continue to do so for several billion years more. Only half a billionth of this energy reaches the Earth. The rest is lost in space.