Answer:
Both statements are true.
Explanation:
When a celestial object (stars, galaxies) is moving away from an observer its spectral lines¹ will be shifted to the red part of the spectrum² (longer wavelength), in the other hand if the celestial body is moving toward the observer, the spectral lines will be shifted to the blue part of the spectrum (shorter wavelength). That is known as the Doppler shift.
This Doppler shift can be explained with the Doppler Effect³, which is defined for the case of light as:
(1)
Where is the wavelength shift, is the rest wavelength, v is the velocity of the source and c is the speed of light.
This redshift in distant galaxies is a strong evidence for the expansion of the universe. Equation 1 also allows the measurement of radial velocity from celestial objects.
Summary:
Blueshift:
Redshift:
¹Spectral lines: Determines the presence of particular elements in the photosphere of an star.
²Spectrum: Decomposition of light in its characteristic colors (wavelengths).
³Doppler Effect: Change in the frequency of a wave as a consequence of the movement from a source relative to an observer or vice versa.