WHY SOLAR ECLIPSE AND LUNAR ECLIPSE NOT OCCUR IN EVERY 30 DAYS ( WE HAVE TO SURE THAT EARTH AND MOON BECOMES IN A LINE IN 30 DAYS)
Eclipses may occur when the Earth and the Moon are aligned with the Sun, and the shadow of one body cast by the Sun falls on the other. So at new moon or rather dark moon, when the Moon is in conjunction with the Sun, the Moon may pass in front of the Sun as seen from a narrow region on the surface of the Earth and cause a solar eclipse. At full moon, when the Moon is in opposition to the Sun, the Moon may pass through the shadow of the Earth, and a lunar eclipse is visible from the night half of the Earth.
An eclipse does not happen at every new or full moon, because the plane of the orbit of the Moon around the Earth is tilted by 5°09' with respect to the plane of the orbit of the Earth around the Sun (the ecliptic): so as seen from the Earth, when the Moon is nearest to the Sun (new moon) or at largest distance (full moon), the three bodies usually are not exactly on the same line.