The Moon's path here is its own orbit around Earth, combined with Earth's orbit around the Sun — the same "add the velocities" idea from relative motion.
Side note: this model simplifies the real solar system down to just these three bodies, with the Sun treated as perfectly fixed. In reality, every planet, the Sun itself, and even other stars and galaxies all exert some gravitational pull on each other — real orbits are influenced by far more than one other body. This simulation isolates the Sun–Earth–Moon relationship so the key ideas are easy to see clearly.
Also not to scale: the real Sun is about 109 Earth-diameters across, and 400 times farther from Earth than the Moon is — drawn accurately, the Moon and its orbit would be invisible on any screen. Sizes and distances here are chosen for visibility, not accuracy.
PhysicsPrep — Physics Through Problem Solving