An eclipse occurs when one celestial body moves into the shadow of another, blocking light from a star or the sun. The most notable types are solar and lunar eclipses. Solar eclipses happen when the moon passes between Earth and the sun, while lunar eclipses occur when Earth casts a shadow on the moon.