Radial velocity measurement is also known commonly as redshift and blueshift. If a light source moves toward or away from you, it changes frequency.
Train horns do the same thing with sound.
As a train passes the crossing, the horn noticeably changes pitch. If our eyes were sensitive to extremely small changes, we would see the train coming at us slightly bluer, and going away it would look slightly redder. A star's gravity can be strong enough to keep a planet in orbit, but the planet is pulling on the star, too, and this tug causes the star to move back and forth. Because we can't see the planet, the movement of the star is an alternate way to detect the presence of the companion. These markers can only be seen when you spread the light into a rainbow or spectrum.