The radial velocity method to detect exoplanet is based on the detection of variations in the velocity of the central star, due to the changing direction of the gravitational pull from an (unseen) exoplanet as it orbits the star. When the star moves towards us, its spectrum is blueshifted, while it is redshifted when it moves away from us. By regularly looking at the spectrum of a star - and so, measure its velocity - one can see if it moves periodically due to the influence of a companion.