Nuclear fusion occurs here in the core. Normally hydrogen atoms would repel each other, but since the core is so hot, the atoms move so fast that they fuse together. When this happens, helium is created. But helium has a lower mass than two hydrogen atoms, so that leftover mass is created into energy, which is proven by Einstein's famous equation, E=mc^2. This is called nuclear fusion, and is what fuels the sun. The leftover energy from nuclear fusion is in the form of a photon, which is a light particle. This photon will eventually make it's way through the sun, and reach Earth.