Scientists can make predictions about earthquake probability, but there is no reliable way to foresee any given earthquake. Some people have claimed that they can predict earthquakes, but their claims do not withstand scientific scrutiny.
In areas along large fault lines, where earthquakes occur more frequently, scientists can estimate the average length of time between major earthquakes. On the San Andreas fault, for example, there is usually a large-scale earthquake every 100 years. Many scientists subscribe to the theory that the next earthquake is likely to happen when the strain released by the previous earthquake is re-established.
Short-term earthquake prediction is much more difficult to accomplish. There are some precursors to warn the community, but it is difficult to observe them and to determine if the precursors actually cause earthquakes.