The Sun generates its energy by nuclear fusion of hydrogen nuclei into helium. In its core, the Sun fuses 620 million metric tons nuclear fusion energy pdf hydrogen each second.
This process is called a nuclear reaction. It releases a large amount of energy. The nucleus made by fusion is heavier than either of the starting nuclei. This lost mass is changed into lots of energy.
Fusion happens in the middle of stars, like the Sun. Hydrogen atoms are fused together to make helium. This releases lots of energy. This energy powers the heat and light of the star.