Here's why:
* The moon reflects sunlight. We see the moon because sunlight is reflected off its surface.
* The moon's orbit: The moon orbits the Earth, and its position relative to the Earth and sun changes constantly.
* Moon phases: These changes in position create the different phases of the moon (new moon, crescent, first quarter, gibbous, full moon, etc.).
During a new moon, the moon is between the Earth and sun, making it invisible to us. As the moon moves in its orbit, it becomes visible as a crescent, and then the first quarter. During these phases, the sun and moon can be in the sky together.
The only time you won't see the moon and sun in the sky at the same time is during a full moon. This is because the Earth is between the sun and the moon, so the moon is visible all night while the sun is down.