An eclipse occurs when the moon comes between the sun and the earth.