The visible surface of the sun, or the photosphere, is around 6,000°C.
But a few thousand kilometers above it—a small distance when we consider the size of the sun—the solar atmosphere, also called the corona, is hundreds of times hotter, reaching a million degrees celsius or higher.
The coronal heating problem has been established since the late 1930s, when the Swedish spectroscopist Bengt Edlén and the German astrophysicist Walter Grotrian first observed phenomena in the sun's corona that could only be present if its temperature was a few million degrees celsius.
This represents temperatures up to 1,000 times hotter than the photosphere beneath it, which is the surface of the sun that we can see from Earth.
Source
But a few thousand kilometers above it—a small distance when we consider the size of the sun—the solar atmosphere, also called the corona, is hundreds of times hotter, reaching a million degrees celsius or higher.
The coronal heating problem has been established since the late 1930s, when the Swedish spectroscopist Bengt Edlén and the German astrophysicist Walter Grotrian first observed phenomena in the sun's corona that could only be present if its temperature was a few million degrees celsius.
This represents temperatures up to 1,000 times hotter than the photosphere beneath it, which is the surface of the sun that we can see from Earth.
Source