But, in the heart of the Sun, the temperature is around 15 million degrees. Here, the “nuclei” of atoms of the lightest element, hydrogen, slam together and stick to make nuclei of helium, the second lightest element. The by-product is sunlight. This process is so inefficient that, on average, it takes two hydrogen nuclei 10 billion years to find each other and stick. It is because of this that the Sun will burn for about 10 billion years, providing enough time for the evolution of complex life like us.
To give you some idea of how inefficient is the Sun’s heat generation, imagine your stomach and a region in the heart of the Sun the same size and same shape as your stomach. Your stomach generates more heat. So why is the Sun hot? Simples. Because it is made of an unbelievably large number of chunks the size of your stomach all stacked together.