An eclipse of the sun occurs when the moon passes directly in front of the sun and cuts off the light from it.