The moon takes about a month to orbit around the Earth. So why we don't have solar eclipse every month?
The moon's orbit is at a slight angle from the plane of earth's orbit around the sun, so it doesn't always hit the right spot, as described on NASA's Total Solar Eclipse 2017 site:
Eclipses only occur if the Moon is located within 0.5 degrees of the plane of the ecliptic, on a line that passes through the center of the Sun and the Earth. The Moon travels along an orbit that is inclined by 5 degrees to the ecliptic plane, so there are only two opportunities each month when it passes through the plane of the ecliptic. These points are called the ascending and descending nodes. Eclipses of the Sun only occur if new moon occurs when the Moon is near of one of these nodes. A similar argument explains why lunar eclipses do not occur every full moon at the node opposite the Sun from the Earth.
An eclipse (solar or lunar) happens when the Moon, Sun and Earth align in space and when the Moon intersects exactly with Earth's orbital plane around the Sun. However the Moon's orbit is not exactly the same as Earth's orbital plane (ecliptic) but inclined with a couple degrees.
The locations where the Moon intersects the ecliptic, called nodes, change in time. It happens two times every month but only when these nodes coincide with new or full moon an eclipse will happen.