It takes the moon 29.55 days for the moon to orbit once around the earth. It also takes 27.322 days for the moon to rotate once. So the moon is basically rolling around the earth.
The reason that you see waves on the beach is caused be the moon and the sun. This happens because the sun and the moon pull on water making it fall down right after.