The sun uses nuclear fusion to produce energy.
Nuclear fusion begins in the core, the hottest part of the sun that contains high concentrations of compressed hydrogen. Here, hydrogen atoms are converted to helium molecules. From the core, the abundant amounts of energy radiate outwards towards the Sun's surface and beyond.
Hope this helps! :)