Fraunhofer lines are dark absorption lines in the solar spectrum that can be seen when sunlight is passed through a prism to separate it into the colors of the rainbow. They occur because cooler gas, which is higher in the Sun's atmosphere, absorbs some colors of the light emitted by hotter gas lower in the Sun's atmosphere. Sir Isaac Newton (1642-1727) discovered that if white light is passed through a prism, it separates into a rainbow, which is called a spectrum. While studying the spectrum that sunlight made, Joseph Fraunhofer (1787-1826) discovered some dark lines scattered among the colors. These dark lines were segments of colors missing from the complete spectrum. Fraunhofer counted 574 of these lines, which we now call Fraunhofer lines. Today, using much more sophisticated techniques, astronomers have discovered tens of thousands of Fraunhofer lines. Why doesn't the Sun emit these missing colors? Or, if the Sun does emit these colors, what happens to the light before it reaches Earth? The answer lies at the surface of the Sun.
When we look at a picture of the Sun, the surface that we see is called the photosphere. The photosphere is a region, several hundred kilometers thick, in which the Sun changes from opaque to transparent. It is not actually the outermost surface: the Sun extends for thousands of kilometers beyond the photosphere, but it is not usually visible from Earth. The photosphere is interesting because within this thin layer of the Sun (thin compared to the whole Sun, of course) sunlight is created, and some of the colors are lost almost immediately. The lower region of the photosphere has a temperature of about 10,000o F (about 5,500o C) and glows white-hot. Any object that glows due to a high temperature gives off a complete spectrum, that is, it has all the colors of the rainbow. As this light proceeds upwards in the Sun into a higher region of the photosphere, the temperature drops several thousand degrees. Although most of the light passes right through, some of the light is absorbed by the cooler gas. Only certain colors are removed because the chemical elements in the photosphere can only absorb certain wavelengths of light, and different wavelengths correspond to different colors. For example, sodium absorbs some yellow light at a wavelength of about 5.89x10-7m. These absorbed colors cause the Fraunhofer lines. By measuring precisely the wavelengths of the missing colors, that is, the Fraunhofer lines, and how much light is actually absorbed, astronomers have learned much about the temperature inside the Sun and its chemical composition.
We can also learn about other stars in the sky by looking at the absorption lines in their spectra. By studying the similarities and differences that they have with the Fraunhofer lines, we can learn a lot about the similarities and differences that other stars have with our Sun.