A foreshock is a smaller earthquake that occurs in the same area as a larger earthquake, known as the mainshock, and often happens hours to days before it. These preliminary tremors can indicate an impending larger seismic event, although not every earthquake has foreshocks. Understanding foreshocks helps scientists assess potential earthquake risks and improves the ability to predict seismic activity.