The moon is constantly orbiting around the earth. It takes around 28 days to go around the earth one time. Whether the sun is out or not the moon is there, you might not be able to see it in the day.
well actually the moon is way far away to the sun but to us they are close but it is always called the moon but once its the moon on top pf the sun or the other way around its called an eclipse