Photometric transits
They used special satellites and telescopes, like magic tools, to observe the stars' brightness going up and down as the planets passed by.
Technical definition
The decrease in a star's observed brightness caused by a planet passing in front of it.