Detecting tiny planets amid a star's glare, from many light-years across the galaxy, is very challenging. Direct imaging, or resolving planets as pixels in a photograph, is only possible today for large, Jupiter-class and above, planets.
Here are some methods that scientists have used to tease out information about distant exoplanets:
Transit method: As a planet eclipses its star as seen from Earth, the intensity of starlight drops measurably. Example: NASA's Kepler Spacecraft Finds 1st Alien Planet of New Mission
Pros: Possible to monitor many stars at once from a single instrument. Yields mass and radius of planets.
Cons: Only usable where planet’s orbit brings it across the star’s disc as seen from Earth. Also, up to 40 percent risk of false positives.
Radial velocity method: A massive planet’s gravity will cause its star to “wobble,” resulting in blue-shifted light when the star is tugged toward Earth and red-shifted light when tugged away. Example: 'Super-Earth' Alien Planet May Be Habitable for Life
Pros: Yields minimum mass and orbital inclination of planets.
Cons: Reliable only out to about 160 light-years from Earth for low-mass planets. Impossible to monitor many stars at once from a single instrument. Not usable when planet’s orbit is highly inclined relative to Earth.
Gravitational microlensing method: A chance alignment of a nearby star (with planet) and a distant star causes the near star's gravity to act like a lens, bending and concentrating the far star's light. Seen from Earth, the near star's planet shows up as an additional increase in brightness as the planet's gravity also temporarily lenses the far star's light. Example: Newfound Alien Planet Is One of the Farthest Ever Detected
Pros: Currently, the only method of detecting exoplanets at distances of tens of thousands of light-years from Earth. Possible to monitor many stars at once from a single instrument.
Cons: Planets observed by this method will not be seen again because microlensing events cannot be repeated.