Eclipses occur when the Earth, Sun, and Moon lie along a line such that either the shadow of the Earth falls on the Moon (lunar eclipse) or the Moon's shadow falls on the Earth (solar eclipse).
When earth’s shadow falls on the moon, the shadow causes a lunar eclipse.