Kids are often taught to associate the sun with the day and the moon and stars with the night. Yet why does the moon sometimes come out during the daylight hours?

The answer is somewhat simple: The moon and stars are always somewhere in the sky, but we can’t always see them.

"The sun is so bright during the day that it kind of drowns out the light from the moon and the stars," says astrophysicist Cheyenne Polius. She is president and co-founder of the Saint Lucia National Astronomy Association in the Caribbean region.

During the new moon, the moon is between the sun and the Earth, the side of the moon that is lit by the sun is facing away from our planet. This means that the moon is still up there, but we can’t see it in the daytime, because all of the sun’s light is getting reflected away from us.

As the moon continues in its orbit around the Earth, away from the sun, increasingly more of its sunlit surface is visible. This is why the moon sometimes appears as a crescent or half-moon. When it’s farther from the sun and visible above the horizon, it’s easier to spot during the day.

“The best time to see the moon during the day is when it’s in the first and last quarter phases (90 degrees away from the sun) because that’s when we can see half of the moon’s lit side while the sun is still up,” Polius says.

Then, halfway through its orbit, the moon is “behind” the Earth with respect to the sun, and we can see the entire surface lit by the sun. This is what’s known as a full moon, but it’s visible only at night.

Usually, the moon travels at an angle that still allows sunlight to reach it when it’s behind the Earth. But a few times in the year, it passes behind the Earth at a precise angle where no light can reach it. This is what’s called a lunar eclipse.

Not only does the moon appear to change shape by way of an optical illusion, it also appears to move across the sky. Just as the sun appears to “rise” and “set,” the moon’s daily trips across the sky are mostly created by the rotation of the Earth.

The moon can also appear to change colors, says Polius. When it sits low on the horizon, there’s more atmosphere between us and the moon, and all of those particles have a way of scattering certain kinds of light, like wavelengths in the blue spectrum. This leaves behind light closer to the red spectrum, which is why a moon low on the horizon can sometimes appear more yellow or even pink than one that is directly overhead.

But don’t be fooled, says Polius. The moon is always the same color. It just looks different to us under different conditions.

How was Earth’s biggest bestie formed?

“The leading theory now is that the moon used to be part of the Earth,” says Polius.

Scientists have found evidence to suggest that about 4.5 billion years ago, a giant space object about the size of Mars slammed into the side of our planet. The impact is thought to have sent tons of debris into space, where it slowly came together to form a large, dusty ball. And because that space ball was still close to the Earth, it got trapped by the Earth’s gravity and eventually settled into the orbit we take for granted today.

So the next time you see that giant, ponderous chunk of rock crawling across the sky, look down at the ground beneath your feet and think about where the moon might have come from.