Answer:The answer is simple. Nuclear fusion
Explanation
Where does sun gets its energy from to perform nuclear fusion?
The answer is simple. Nuclear fusion requires very high temperatures to occur. The sun is made of gasses, mostly hydrogen. When a gas is compressed adiabatically (without heat transfer) the temperature of the gas increases. (Incidentally, this is why Diesel engines don’t need spark plugs. The compression stroke causes the temperature of the fuel mixture to rise, causing ignition.) The increase in internal energy comes from work done on the gasses by gravity. In the process of formation of a star, like the sun, the mixture of gases of which it is composed is compressed due to gravity until it reaches a high enough temperature to produce fusion