What’s this got to do with velocities?
Well, the waves of electromagnetic radiation coming from some distant object can be used to see whether that object is moving away from us or towards us.
If the waves are bunched unusually close together, the object must be moving towards us. This would mean that all the bumps and wiggles in a spectrum would appear to be at slightly shorter wavelengths than usual.
If they are unusually spread apart, the object must be moving away from us. All the bumps and wiggles will be at slightly longer wavelengths than usual.
This effect is called the “Doppler Effect”. It is widely used on Earth, for such things as radar and speed traps.