When an object stands in front of a source of light like the Sun, the light is blocked and there is a patch of darkness behind the object. We call this a shadow.
This is just as true for small objects like a person as for giant objects like the Moon. So when the Moon gets between the Sun and the Earth, it casts a shadow on the Earth. We call this an eclipse.