The motions of the Moon around the Earth and of the Earth around the Sun are complex. The motions involved in revolutions are superimposed on the movements involved in rotations. The Earth and the Moon both turn on their own axis (rotation), but both also move around another object (revolution).
The rotation of the Earth (24 hours) explains the alternation of day and night.
The revolution of the Earth around the Sun (365.25 days), because of the inclination of its axis (not shown here), explains the changing seasons.
The fact that the rotation of the Moon on its own axis and its revolution around the Earth both require the same amount of time (29.5 days) explains why the Moon always shows its same side to the Earth.
In this animation, neither proportions nor time scales are accurately presented.