An eclipse occurs when one heavenly body passes in front of another, blocking its light. There are two types of eclipses on Earth: solar and lunar. A solar eclipse happens when the moon passes between the earth and sun, casting its shadow on earth. A lunar eclipse occurs when the earth passes between the sun and moon, casting its shadow on the moon. Eclipses can be partial or total depending on how much of the sun or moon is blocked.