First of all, it is not that you can always find the planet (if it is there).
Anyway, if this is the case, when we observe the system not totally face-on, we resort to radial velocity measurements. The principle is simple, the actual much less.
The orbiting of the planet around the star causes the star to "oscillate" around the center of mass.
Here you can see a good example:

However, when the system is exactly face-on, the Doppler shift is useless, but still the gravitational effect of the planet onto the star is useful and used.
Here is what happens in the latter case:

It is clear that the star undergoes a change in position.
Then usually, the radial measurements go along with astrometrical measurements, to identify the position of the star along the planet's orbit.
Of course, you need some conditions are verified to allow this measurement.
First of all, you planet must be massive enough to bring a sensible change in the position of the star. Then your instrument must be sensible enough to resolve the tiny effect originated by this change.
Possibly, also other conditions play a role, but I am not an expert (you can take a look at here).
For a general comprehension, also a wiki for Methods of detecting exoplanets.