How do they predict an earthquake?

It will be better if you have defined whom you are referring when you are saying "they". But taking it on a broader view below points can be of help:
  1. Laser beams can be used to detect plate movement.
  2. A seismometer is used to pick up the vibrations in the Earth's crust. An increase in vibrations may indicate a possible earthquake.
  3. Radon gas escapes from cracks in the Earth's crust.
An earthquake may or may not be predicted in any of the following ways:

1. By way of the senses, in terms of witnessing changed animal behavior such as:

seeing burrowing animals out and about as though homeless at times that they usually are in their holes;
hearing and seeing birds in suddenly increased, agitated flight and communication patterns that just as suddenly stop;
feeling a pre-earthquake shock wave;

2. By use of scientific equipment such as:

creepmeters, to identify movement in the soil;
global positioning systems, to identify movement in the crustal [or lithospheric or tectonic] plates;
laser light, to identify movements that disrupt a light beam transmission over a fault line;
magnetometer, to identify magnetic field activity;
strainmeters, through the coordinated use of the seismograph and the seismometer, to identify vibrations.