While some planets have been observed directly with telescopes (a process known as “Direct Imaging”), the vast majority have been detected through indirect methods such as the Transit Method. This method attempts to spot planets as they cross in front of the parent star's disk - during which time there will be a temporary drop in observed brightness - and can also reveal the radius of a planet and sometimes yield information on its atmosphere (with the help of spectrometers).
This method remains the most widely-used means of detection and is responsible for more exoplanet discoveries than all other methods combined. However, due to interference from other light sources, it also suffers from a substantial rate of false positives, and generally requires that part of the planet’s orbit intersect a line-of-sight between the host star and Earth.
"The starshade works just like your thumb when trying to block the Sun; it blocks the starlight from entering the telescope but allows light from he planet close by to pass unimpeded. Since planets are so much dimmer than their host stars, this technology eliminates the problem of glare from the star swamping light from the planet. And because the starlight never enters the telescope, any conventional telescope can be used; no special attention needs to be paid to stabilities and precision in the telescope."