When a distant object moves toward the observer the lines in its spectrum shift to shorter (bluer) wavelengths. This is because of the apparent compression of the wave of light. As a result of this compression the wavelength shortens and thus shifts towards the blue side of the electromagnetic spectrum. The blueshift of an astronomical object is an indication of the speed at which this object is approaching the observer.