Here's why:
* The Doppler Effect: This is the change in frequency of a wave (like light) as the source of the wave moves relative to an observer. Think of a siren: it sounds higher pitched when it's moving towards you and lower pitched when it moves away.
* Light as a Wave: Stars emit light, which acts as a wave.
* Shifting Wavelengths: When a star moves towards us, the light waves get compressed, shifting them towards the blue end of the spectrum (blueshift). When a star moves away from us, the light waves get stretched, shifting them towards the red end of the spectrum (redshift).
* Measuring Radial Velocity: By analyzing the shift in the star's light, astronomers can measure how fast the star is moving towards or away from us. This is its radial velocity.
Note: The Doppler effect only tells us the speed of a star along our line of sight (its radial velocity). It doesn't tell us its true motion in three dimensions (its tangential velocity).