Each atom has it's own special spectrum. e.g. Hydrogen spectrum lines.

If a planet contain hydrogen atom and the planet is moving away from us,
The spectrum lines emitted from the planet will be similar to Hydrogen spectrum lines on earth.
However, all the line are shift to lower frequency (larger wavelength).
If there is a spectrum line in visible region, it will move toward red light region.
That is why we call it red shift.