Press the START button to start the animation. As both Mars and the Earth move round their orbits the position of Mars against the background of the stars changes. Sometimes it mmoves forwrads compared with stars and sometimes backwrds although it is contually moving in the same direction in its orbit.
This phenomenon is called RETROGRADE MOTION and was a real problem for the ancient astronomers. Ptolemy proposed the epicycle theory to explain this.