A solar eclipse occurs when the Moon is directly in line between the Sun and Earth, so that the Moon's shadow falls on part of the Earth. It is interesting to note that although the Sun is 400 times bigger than the Moon, it is also about 400 times further away, so the two objects look the same size (about half a degree of arc) on the sky.
However, due the Earth's and the Moon's orbits are elliptical in shape, the visual sizes of the Sun and the Moon in the sky are actually changing a little bit everyday. During solar eclipse, if the angular size of the Moon is larger than that of the Sun, the Sun will be totally covered, resulted in total solar eclipse. In case the Moon is smaller than the Sun, only the central part of the Sun will be blocked and we will have an annular solar eclipse.