Blue shift
Blue shift is one example of the Doppler effect. It is the opposite effect to redshift.
Doppler blueshift is caused by movement of a source towards the observer. The term applies to any decrease in wavelength caused by relative motion, even outside the visible spectrum.
The wavelength of any reflected or emitted photon or other particle is shortened in the direction of travel.
Doppler blueshift is used in astronomy to determine relative motion:
The Andromeda Galaxy is moving toward our own Milky Way galaxy within the Local Group. When observed from earth, its light shows a blueshift.
Components of a binary star system will be blueshifted when moving towards Earth
When observing spiral galaxies, the side spinning toward us will have a slight blueshift relative to the side spinning away from us.
Blazars may emit relativistic (near the speed of light) jets toward us that appear blueshifted.
Nearby stars such as Barnard' s Star are moving toward us, resulting in a very small blueshift.
Doppler blueshift of distant objects (high z) can be got from the much larger cosmological redshift. This shows relative motion in the expanding universe.
The reason astronomers can tell how far the light gets shifted is because certain chemical elements, like the calcium in bones or the oxygen people breathe has a unique fingerprint of light that no other chemical element has. They can see what colors of light are coming from a star, and see what it is made of. Once they know that, they look at the difference between where the fingerprint (called spectral lines) is and where it is supposed to be. When they see that, they can tell how far away the star is, whether it is moving toward us or away from us, and also how fast it is going, since the faster it goes, the farther the distance the spectral lines are from where they should be.
References
Astronomical phenomena
Light