Blueshift is observed when:
a distant luminous object travels rapidly towards an observer.
This is because, as the object moves closer, the wavelengths of the light waves it emits are compressed, resulting in a shift towards the blue end of the spectrum.