Spectral Lines
When light hits an atom it "excites" some of the electrons and causes them to jump to a higher energy level. They then fall back down to their ground state and release quantum of energy in the form of light. Different atoms have different electron configurations so they give of different spectra of light .
The Doppler Effect
The Doppler effect is the change in frequency of a wave for an observer moving relative to its source. The Doppler effect causes the received frequency of a source (how it is perceived when it gets to its destination) to differ from the sent frequency if there is motion that is increasing or decreasing the distance between the source and the receiver.
Red Shift
Red shift is shown when stars are moving away from us, they become red due to electromagnetic waves being stretch into lower frequencies . When stars are coming towards us, it is called Blue shift.