The Sun is hot. Really really hot. But all of the heat and light coming from the Sun comes from the fusion process happening deep inside the core of the Sun. The core of the Sun extends from the very center of the out to about 0.2 solar radii. Inside this zone, pressures are million of times more than the surface of the Earth, and the temperature reaches more than 15 million Kelvin. This is where fusion in the Sun happens.
Every second, 600 million tons of hydrogen are being converted into helium. This reaction releases a tremendous amount of heat and energy.
The process of fusion in the Sun is known as the proton-proton chain. The Sun starts with protons, and though a series of steps, turns them into helium. Since the total energy of helium is less than the energy of the protons that went into it, this fusion releases energy.
Here are the steps.
1. Two pairs of protons fuse, forming two deuterons
2. Each deuteron fuses with an additional proton to form helium-3
3. Two helium-3 nuclei fuse to create beryllium-6, but this is unstable and disintegrates into two protons and a helium-4
4. The reaction also releases two neutrinos, two positrons and gamma rays.
As we said, a helium-4 atom has less energy than the 4 protons came together. All of the heat and light streaming from the Sun came from this fusion reaction.
We have recorded an episode of Astronomy Cast just about the Sun called The Sun, Spots and All.