Reshared post from +NASA
The sun's surface is blisteringly hot at 10,340 degrees Fahrenheit — but its atmosphere is another 300 times hotter. This has led to an enduring mystery for those who study the sun: What heats the atmosphere to such extreme temperatures? Normally when you move away from a hot source the environment gets cooler, but some mechanism is clearly at work in the solar atmosphere, the corona, to bring the temperatures up so high.
Clear evidence now suggests that the heating mechanism depends on regular, but intermittent explosive bursts of heat, rather than on continuous gradual heating.