A solar eclipse occurs when the Moon passes between the Sun and Earth, blocking the Sun's light and casting its shadow on Earth. A lunar eclipse happens when the Moon passes behind Earth and into its shadow. Both solar and lunar eclipses are natural phenomena that occur when the Sun, Moon, and Earth are aligned in a straight line.