Think of it like this:
* The Earth orbits the Sun: This is a big, slow orbit that takes a year to complete.
* The Moon orbits the Earth: This is a smaller, faster orbit that takes about a month to complete.
So, while the Moon appears to go around the Earth, it's really following the Earth as the Earth goes around the Sun. It's like a little kid holding onto their parent's hand while they walk around the park! The kid is moving with the parent, but also moving in a smaller circle around the parent's hand.