Here's why:
* Doppler Effect: Similar to how the pitch of a siren changes as it moves towards or away from you, the frequency of light waves changes when the source is moving.
* Redshift: When a star moves away from us, the light waves are stretched out, increasing their wavelength. Since red light has the longest wavelength in the visible spectrum, the light appears redder.
* Blueshift: Conversely, when a star moves towards us, the light waves are compressed, shortening their wavelength and making the light appear bluer.
Important Note: While redshift indicates a star is moving away, it doesn't tell us how fast. Astronomers use a specific type of redshift called "cosmological redshift" to determine the expansion of the universe.