A small earthquake that occurs before a larger earthquake is called a foreshock.
The term is assigned to an earthquake only after a larger, related event occurs. Until then, scientists cannot know whether a tremor is a foreshock or simply an isolated earthquake. The later, larger event is called the mainshock, while subsequent smaller events are aftershocks.
Foreshocks can occur minutes, days, or even much longer before a mainshock. The 2002 Sumatra earthquake, for example, has been described as a foreshock of the devastating 2004 Indian Ocean earthquake. However, most small earthquakes are not followed by a larger nearby earthquake, so foreshock activity is not a dependable prediction method.
A common mix-up is confusing a foreshock with an aftershock. The difference is chronological: a foreshock comes before the mainshock, and an aftershock follows it. The same earthquake sequence can only be classified accurately after the sequence has developed.