Figure: Searching for Extrasolar Planets by Doppler Spectroscopy

It is difficult to find planets around other stars because the light from the star is so bright that the glare drowns out the light reflected from the planet. It's like trying to see a lighted birthday candle placed in front of a search light. So, the only way to detect extrasolar planets at this time is to measure their effects on their parent stars. There are two ways in which planets affect their parent stars: They tug on the star as they orbit it, and they can dim the light from the star if they pass directly between the star and our field of view (eclipsing part of the star's light). The effects of these planetary motions on the star can be detected from Earth by (at least) the following three methods:
In this caption, we only talk about the Spectroscopic technique:

Doppler Spectroscopy
As a planet orbits a star, it periodically pulls the star closer to and farther away from Earth (our observation point). This motion has an effect on the spectrum of light coming from the star.

As the star moves toward the Earth, the light waves coming from it are compressed and shifted toward the blue (shorter-wavelength) end of the spectrum. As the star moves away from us, the light waves are stretched out toward the red (longer-wavelength) end of the spectrum. These shifts in the spectrum of light coming from the star are called Doppler shifts. By making measurements of the star's spectrum over time, we can detect shifts that would indicate the presence of a planet. We can also use Doppler shifts to measure the radial velocity of the star's movement, which is how fast the star moves toward us and away from us.

Conceptually, we can deduce the size of the planet from the radial velocity. A massive planet will tug on the star with more gravitational force than a small one, causing the star to have a greater radial velocity. If we graph measured radial velocity versus time, we get a "sine" curve like the one shown above. From the period (peak-to-peak time or trough-to-trough time) and the star's mass, we can get the distance of the planet from the star -- the planet's orbital radius. From the amplitude of the curve, we can calculate its mass (see High precision Doppler measurements: The physics and techniques for finding planets and Doppler-Wobble Tutorial for details).

Credit: Craig C. Freudenrich; HowStuffWorks, Inc.

http://science.howstuffworks.com/planet-hunting2.htm