How would someone measure the temperature of the sun?
The core of the Sun is about 15 million degrees; the surface is about 5000. We can measure the temperature by looking at the light we get from it – certain ‘colors’ only appear from certain atomic transitions that occur at high temperatures. If we see, say, some iron lines, we know it must be at least a million degrees.