When the moon passes between the earth and the sun it blocks light, which creates an area of darkness. This is commonly known as a solar eclipse.