A blueshift is any decrease in wavelength (increase in energy), with a corresponding increase in frequency, of an electromagnetic wave. In visible light, this shifts a color towards the blue end of the spectrum. The opposite effect is referred to as redshift.
Doppler blueshift is caused by movement of a source towards the observer. The term applies to any decrease in wavelength and increase in frequency caused by relative motion, even outside the visible spectrum. Only objects moving at near-relativistic speeds toward the observer are noticeably bluer to the naked eye, but 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:
Unlike the relative Doppler blueshift, caused by movement of a source towards the observer and thus dependent on the received angle of the photon, gravitational blueshift is absolute and does not depend on the received angle of the photon:
Photons climbing out of a gravitating object become less energetic. This loss of energy is known as a "redshifting", as photons in the visible spectrum would appear more red. Similarly, photons falling into a gravitational field become more energetic and exhibit a blueshifting. ... Note that the magnitude of the redshifting (blueshifting) effect is not a function of the emitted angle or the received angle of the photon--it depends only on how far radially the photon had to climb out of (fall into) the potential well.
It is a natural consequence of conservation of energy and mass-energy equivalence, and was confirmed experimentally in 1959 with the Pound-Rebka experiment. Gravitational blueshift contributes to cosmic microwave background (CMB) anisotropy via the Sachs-Wolfe effect: when a gravitational well evolves while a photon is passing, the amount of blueshift on approach will differ from the amount of gravitational redshift as it leaves the region.
There are faraway active galaxies that show a blueshift in their [O III] emission lines. One of the largest blueshifts is found in the narrow-line quasar, PG 1543+489, which has a relative velocity of -1150 km/s. These types of galaxies are called "blue outliers".
In a hypothetical universe undergoing a runaway Big Crunch contraction, a cosmological blueshift would be observed, with galaxies further away being increasingly blueshifted--the exact opposite of the actually observed cosmological redshift in the present expanding universe.