Light from a star does not contain all the wavelengths of the electromagnetic spectrum. Elements in the star absorb some of the emitted wavelengths, so dark lines are present when the spectrum is analysed. Different elements produce different patterns of dark lines. The diagram shows part of the emission spectrum of light from the Sun.
Astronomers can observe light from distant galaxies. When they do this, they see it is different to the light from the Sun. The dark lines in the spectra from distant galaxies show an increase in wavelength. The lines are moved or shifted towards the red end of the spectrum. This effect is called red-shift. The diagram shows part of the emission spectrum of light from a distant galaxy.
Astronomers see red-shift in virtually all galaxies. It is a result of the space between the Earth and the galaxies expanding. This expansion stretches out the light waves during their journey to us, shifting them towards the red end of the spectrum. The more red-shifted the light from a galaxy is, the faster the galaxy is moving away from Earth.
Astronomers have found that the further from us a star is, the more its light is red-shifted. This tells us that distant galaxies are moving away from us, and that the further away a galaxy is, the faster it's moving away.
Since we cannot assume that we have a special place in the Universe, this is evidence for a generally expanding Universe. It suggests that everything is moving away from everything else.