One of the incredible things about astronomy is how much we can tell about stars that we can never, ever approach. But we can take the temperature of a star with our eyes, thanks to the Doppler effect.
This, of course, is the effect that causes the horn of a car speeding by to drop a few notes as it passes us. As the car comes towards us, the sound waves it emits get pushed together and hit us at a higher frequency. A higher frequency is another way of saying a higher note. As the car passes, and trails its sound waves behind it, they get more spread out, and hit us at a lower frequency and a lower note.
The same thing happens with light. A star coming towards us pushes its light waves together (at least with respect to us) and the light looks like it's a higher frequency. This is called blue shift, as light towards the blue end of the spectrum has a higher frequency than the red end. If the star is moving away, its light waves space out and red shift toward the lower end of the spectrum.
A star, which is made up of billions of atoms of burning gas, has all kinds of motion. Each of its atoms is moving around inside of it, which means they're each moving at a slightly different speed with respect to us on Earth. Some are moving away, some are moving closer, but believe it or not, we can see those little movements. They create their own shift effect called Doppler Broadening.
Each atom gives light off at different discrete frequencies. It can give off a specific band of yellow light, a specific band of red light, and a specific band of green light, each at a different intensity level, that we see, overall, as orange. With certain basic tools, we can separate the bands out, and see each of them distinctly. That's how scientists identify what atoms are in what stars.
Some of the gas atoms in a star are moving away, and some are moving toward us. An atom giving off a band of yellow light might be moving towards us, and the yellow band will shift towards the blue end of the spectrum. Another atom will be moving away, and its yellow band will move towards the red end of the spectrum. Another will be standing still (with respect to us), and give off exactly the expected color of light. Since we're seeing them all at the same time, the discrete spectral lines we'd see if we were burning the gas in the lab in front of us,will blur and broaden.
This is Doppler Broadening. If the atoms were still, it wouldn't happen, but then if the atoms were still, they would be so cold they'd be at absolute zero. As gas heats up, its molecules move more and more. Doppler Broadening, then, is dependent on temperature. So if we know how much the spectral lines for a star broaden, we can estimate its temperature, without ever touching it.
Top Image: ESO.