Aftershocks are earthquakes that follow the largest shock of an earthquake sequence. They are smaller than the mainshock and within 1-2 fault lengths distance from the mainshock fault.
Foreshocks are relatively smaller earthquakes that precede the largest earthquake in a series, which is termed the mainshock.