Redshift

Most galaxies appear to be moving away from us. This means that the light from them is "stretched" slightly and appears a bit redder that it would otherwise do.

This is similar to what happens to sound. Imagine that a fire engine is driving past you with its siren on. When it is moving towards you, the siren it quite high-pitched. When it is moving away from you, the pitch drops, and it sounds lower. With light, "lower" means more red and "higher" means more blue.

From studying lots of galaxies we know the further away a galaxy is, the more its spectrum is redshifted. This is because the Universe is expanding. This means astronomers can use redshift to work out the distance to a galaxy.

Example of how the spectra from one galaxy can be shifted compared to another.
The dark lines are absorption lines, the brighter lines are emission lines.
Credit: NSO