The Sun is completely blocked in a solar eclipse because the Moon passes between Earth and the Sun. Even though the Moon is much smaller than the Sun, because it is just the right distance away from Earth, the Moon can fully blocks the Sun’s light from Earth’s perspective.
During a total solar eclipse, the Moon passes between Earth and the Sun. This completely blocks out the Sun's light. However, the Moon is about 400 times smaller than the Sun. How can it block all of that light?
It all has to do with the distance between Earth and the Sun and Earth and the Moon.
an illustration of the Moon blocking the Sun's light during the August 2017 eclipse
An illustration showing the Earth, Moon, and Sun during the August 21, 2017 eclipse.
When objects are closer to us, they appear to be bigger than objects that are far away. For example, most stars in the night sky look like tiny white dots of light. In reality, many of those stars are larger than our Sun—they are just much farther away from Earth!
View attachment 2872160
Even though the Moon is 400 times smaller than the Sun, it's also about 400 times closer to Earth than the Sun is. This means that from Earth, the Moon and the Sun appear to be roughly the same size in the sky.
So, when the Moon comes between Earth and the Sun during a total solar eclipse, the Moon appears to completely cover up the light from the Sun.