A redshift is a shift in the frequency of a photon toward lower energy, or longer wavelength. The redshift is defined as the change in the wavelength of the light divided by the rest wavelength of the light, as
z = (Observed wavelength – Rest wavelength)/(Rest wavelength)
Note that postive values of z correspond to increased wavelengths (redshifts).
Different types of redshifts have different causes.
The Doppler Redshift results from the relative motion of the light emitting object and the observer. If the source of light is moving away from you then the wavelength of the light is stretched out, i.e., the light is shifted towards the red. These effects, individually called the blueshift, and the redshift are together known as doppler shifts. The shift in the wavelength is given by a simple formula
(Observed wavelength – Rest wavelength)/(Rest wavelength) = (v/c)
so long as the velocity v is much less than the speed of light. A relativistic doppler formula is required when velocity is comparable to the speed of light.
The Cosmological Redshift is a redshift caused by the expansion of space. The wavelength of light increases as it traverses the expanding universe between its point of emission and its point of detection by the same amount that space has expanded during the crossing time.
The Gravitational Redshift is a shift in the frequency of a photon to lower energy as it climbs out of a gravitational field.