The Earth rotates in 24 hours. (Actually, a little less, but that's unimportant here.) One side of the Earth is exposed to sunlight at any given time; the other side is in darkness. Thus, we have night and day.
The Moon revolves around the Earth once every 28 days, and is unrelated to the Earth's day/night cycle. If it revolved around the Earth once per day, you'd see the Moon's phase go from full to new and back to full every single day.
- Warren