Final answer:
New and Full Moons occur when the Sun, Moon, and Earth align. During a New Moon, the illuminated side of the Moon faces away from us, making the moon nearly invisible. A Full Moon occurs when the Moon is opposite to the Sun, and its illuminated side faces Earth.
Step-by-step explanation:
The scenario you described, when the sun, moon, and earth are in a straight line, can occur during what are known as New and Full Moons. During a New Moon, the moon is in the same general direction as the sun. This causes the moon's illuminated side to face away from us, making it appear dark from our perspective. It rises at sunrise and sets at sunset.
On the other hand, a Full Moon occurs when the moon and sun are opposite each other in our sky. The side of the moon that receives sun's light is turned toward the earth, hence we see a fully illuminated moon. A lunar eclipse can also occur during a full moon when Earth is in between the Sun and Moon, and the moon is entirely shadowed by the Earth.
If the moon's orbit aligns completely with Earth's orbit around the Sun (the ecliptic), then we might expect to see an eclipse each month. However, due to the moon’s orbit being slightly tilted, the situation does not occur every month, but only during the so-called "eclipse season" when the two paths cross.
Learn more about Lunar phases