This method looks for shifts in the spectrum of light from a star.
You may know that everything in our Solar System orbits the Sun. But that is not quite true. Everything in our Solar System orbits the centre of all the mass in our Solar System. The Sun also orbits around this centre of mass, which gives it a very small wobble. However, since the vast majority of our Solar System's mass is in our Sun, the effect is quite small.
We can use this knowledge when we look for exoplanets. The amount that a star wobbles, is related to the mass, number, and proximity of its planets. A higher planet-to-star mass ratio produces a more noticeable wobble. This is because as this ratio increases, the centre of mass shifts out from the centre of the star. A planet with a longer orbit also produces a bigger shift in the centre of mass.
If a star is wobbling towards and away from the Earth, we can see this using spectroscopy. When the star is moving away from us, its light is "stretched" slightly and appears a bit redder than it would otherwise. We call this redshift. When the star is moving towards us, its light is "squashed" slightly and appears a bit bluer than it would otherwise. We call this blueshift. Repeated shifts from red to blue are due to one or more exoplanets.
We can use the shifts in the spectrum to measure the relative velocity of the star. This data can tell us how long the planet takes to orbit its star. It can also be used to work out the planet's mass and composition.