Hi Daniel!
In solar eclipse the moon passes between the Sun and the Earth covering partly or totally the bright solar disk. In the total eclipse, the Sun is completely obscured by the Moon. It is actually quite a coincidence that at the closest distance from the Earth at its orbit, the Moon has just the right size to cover the whole disk of the Sun! If the Moon would be smaller, it would not be able to cover the whole solar disk. Total solar eclipses reveal the faint corona of the Sun that we do not normally see.
Unlike the Sun, the Moon does not produce its own light. We see the Moon because sunlight reflects from its surface. In lunar eclipse the Moon passes behind the Earth so that the Earth prevents the sun’s light from striking the moon.