How does the sun produce light and heat.

Write an essay of 1500 words, giving credible references on how the sun produce light and heat. Explain all the relevant reactions and their mechanisms