The sun is in the centre of our solar system, and is a large sphere of gas that produces energy and light. The sun is extremely hot - but the exact temperature of the sun varies a lot in many different ways, and depends on which part of the sun you are looking at.
The sun’s heat is created by strong gravitational forces that produce extreme pressures and temperatures. Hydrogen atoms at the core of the sun get compressed by these gravitational forces - so much so, that they fuse together to create helium. This is called nuclear fusion, which produces a large amount of energy. At the rate that nuclear fusion in the sun is currently occurring, astronomers predict that we have approximately 4 billion years until the sun burns out.
The sun’s inner core can reach up to 27 million degrees fahrenheit (15 million degrees celsius). The energy from the nuclear fusion at the inner core of the sun travels outward from the core to what is called the “radiative zone”, where the energy bounces around inside the sun. When it escapes from the radiative zone, it reaches the convective zone, the uppermost layer inside the sun. The temperature at this layer is approximately 3.5 million degrees fahrenheit (2 million degrees celsius).
The energy then reaches the sun’s surface, and spreads out through the atmosphere of the sun. The temperature in the first layer of the sun’s atmosphere (the photosphere) is approximately 10,000 degrees fahrenheit (5,500 degrees celsius). This energy is what we see as sunlight. The photosphere contains some areas called “sunspots”. These spots are darker and not as hot as the rest of the photosphere.
At the next layer of the sun’s atmosphere (the chromosphere), the temperature is around 7,800 degrees fahrenheit (4,320 degrees celsius). The chromosphere is usually unable to be seen as visible light, but during solar eclipses (when the moon covers the sun’s photosphere), the chromosphere can be seen as a red hazy rim around the sun.
The sun’s corona is an aura made of plasma that lies around the sun and other bodies in space. The corona can also be seen during a solar eclipse as a bright halo around the sun. The corona can be very hot (much hotter than the sun’s photosphere and atmosphere), and is as hot as the convective zone inside the sun - 3.5 million degrees fahrenheit (2 million degrees celsius).
The corona sometimes produces what is called a coronal mass ejection (CME). This is a huge burst of solar wind and strong magnetic fields that are released into space. When a CME is directed towards Earth, it causes a geomagnetic storm that can disrupt the magnetic fields on Earth. This can disrupt radio, satellite, and electrical transmissions, and may cause power outages.
Astronomers still aren’t sure how parts of the corona can get as hot as the core of the sun: some think that waves of strong energy are released into the sun’s atmosphere; others think that it might be caused by magnetic forces in the corona. A solar probe called the Solar Probe Plus is planned to be launched to the sun in 2015 to investigate questions like this one.