Planets seen in the sky are always near the ecliptic, which means that their orbits are never too far from the plane of the ecliptic. In other words, the solar system is rather flat, with all its major parts moving in nearly the same plane.
What about the connection between “ecliptic" and eclipses?
The moon's orbit cuts the ecliptic at a shallow angle, around 5 degrees, which means that on the celestial sphere the Moon, too, follows a path through the zodiac. Half the time the Moon is north of the ecliptic, half the time south of it. If the shadow of the moon hits the Earth, the Sun is eclipsed in the shadow area; if on the other hand the shadow of the Earth covers the moon, the moon goes dark and we have an eclipse of the moon.
Either of these can only happen when the Sun, Earth and Moon are on the same straight line. Since the Sun and Earth are in the plane of the ecliptic, the line is automatically in that plane too; if the moon is also on the same line, it must be in the plane of the ecliptic as well.
It takes close to a month for the Moon to go around the Earth (“month" comes from “Moon") and during that time its orbit crosses the ecliptic twice, as it goes from one side to the other. At the time of crossing, the Sun may be anywhere along the ecliptic; usually it is not on the Earth-Moon line, and therefore an eclipse usually does not take place. Occasionally, however, it is on that line or close to it. If it then happens to occupy exactly the same spot on the celestial sphere, we get an eclipse of the Sun, because the moon is then between us and the Sun. On the other hand, if it occupies the spot exactly opposite from that of the Moon, the Earth's shadow falls on the Moon and we have an eclipse of the Moon.
http://antwrp.gsfc.nasa.gov/apod/ap960921.html is a NASA webpage showing three planets and the Sun lined up along the ecliptic.