Jillian's Guide to Black Holes: Forming - Types - Outside - Inside - Finding - References - Websites
Light is electromagnetic radiation. What that means is that light is really a changing electric field (which induces a changing magnetic field, which induces a changing electric field ... which travels through spacetime). The important part is that light can be thought of as a wave in some respects. Just like water waves, light rays have a frequency of arrival (how many wave peaks per second) and a wavelength (the distance between two successive peaks). The longer the wavelength is, the fewer waves can come in during a certain time, thus the lower the frequency.
Light comes in a wide range of frequencies/wavelengths, as shown in the diagram to the right. The longest wavelength (like the size of buildings!) lowest frequency light astronomers study is radio waves. Slightly shorter wavelengths (like the size of people) and higher frequencies are microwaves (just like the microwave cooker in your house!). Slightly shorter wavelength (like the size of the point of a pin) and higher frequency than that (but still not quite visible) is infrared light. You can detect infrared light coming off hot objects with your hands, and it's the kind of light that TV remote controls use. (Digital cameras are slightly sensitive to infrared light, so if you point your remote at a digital camera, you can see it light up!)
Visible light that our eyes detect is a narrow range of frequencies or wavelengths (about the size of bacteria), higher frequency and shorter wavelength than infrared but lower frequency and longer wavelength than UV light (wavelengths about the size of molecules and also the kind of light that causes sunburns). Even higher frequency and shorter wavelength than UV are X-rays (wavelengths the size of atoms), and beyond them are gamma rays (wavelengths the size of the nucleus of an atom)!
You've probably heard how the speed of light is a constant in a vacuum. All light, regardless of frequency/wavelength/color (red, blue, radio, UV, X-ray, etc.), travels at this speed in a vacuum. It has to travel at this speed because photons, particles of light, have no mass. Whatever you do to light, you can't change its speed in a vacuum ... but you can change the frequency/wavelenth/color.
In the presence of a gravitational field time slows down. You don't sit there and wonder why your watch is running slower. Everything slows down --- your watch, your brain, your cells, your very atoms --- everything. Someone who is outside the field would watch you and wonder why you're moving so slowly (and you would wonder why they're moving so quickly). This effect is called time dilation. The stronger a gravitational field, the more time dilation you get.
Suppose you have a light ray in a gravitational field (hey, happens every day!). It can't slow down like your watch and your brain and your cells and your atoms because it's light in a vacuum and it must go a constant speed. So, does it just keep going regardless of gravity? No way! The speed of the light ray can't change, but the frequency/wavelength/color can. How? If a yellow light ray tries to climb out of a very strong gravitational field, it loses energy, its frequency will lower and its wavelength get longer. This process is called gravitational redshifting.
Why red? Consider a color smack in the middle of the visible light spectrum: green. If you make the frequency decrease, the wavelength increase, this green light becomes yellow or red. Thus, its handy to say that light "reddens" when its wavelength becomes longer, regardless of the actual wavelength of light in question.
An object's radial motion causes the light it emits to shift in wavelength, just like how an ambulance siren is Doppler shifted to higher or lower frequencies as it moves toward or away from you. What a crazy concept: the color of an object can change depending on how fast it is moving toward or away from you! How does this work?
Consider the diagram to the right, showing the spectrum (the rainbow with black lines) emitted by a star (orange circle on the right). The star in (A) is not moving relative to the Earth, so the dark lines in its spectrum aren't shifted. There are dark lines at three different wavelengths: purple, cyan, and red. If the star moves side-to-side, we won't see any shift (shown in B). Why include this example if this section talks about changing the color of light? I want to be sneaky and also to emphasize that only radial motion changes the wavelength of the light emitted.
Okay, enough sneaky examples; lets get to the good stuff. If the star moves toward the Earth (shown in C), the light will appear shifted to the blue end of the spectrum. Regardless of what color the light in question is (radio, infrared, blue light itself), astronomers call this process blueshifting. if the star moves away from the Earth, it will be shifted to the red end (shown in D). The faster the motion, the greater the shift. Again, even if the light that we're talking about happens to be blue light (for example), this shift to longer wavelengths is called redshifting.
Why red and blue? Consider a color smack in the middle of the visible light spectrum: green. If you make the frequency decrease, the wavelength increase, this green light becomes yellow or red. If you make the frequency increase, the wavelength decrease, this green light becomes blue. Thus, its handy to say that light "reddens" or "bluens" when its wavelength becomes longer or shorter, respectively, regardless of the actual wavelength of light in question.
The astronomer Edwin Hubble was studying the Doppler shifts of galaxies and noticed that the further away a galaxy is, the faster it seems to be receeding! It looked as if the entire universe was racing away from the Earth! Does that mean the Earth is at the center of everything?! No, not really; this is an illusion born from the fact that the universe is expanding. If you stand at any point in the universe, it will look like everything is expanding away from you. Hubble's Law is a strong relationship and is one of the ways we know the distance to the most distant objects. The most distant quasars have a Doppler shift indicating that they're moving away at a sizeable fraction of the speed of light, and Hubble's Law tells us that they must be across the entire universe from us!