Motion of the Inner Planets
The animation shows the inner solar system from the perspective of the Earth at rest with respect to the Sun. From the Sun, the planets are Mercury, Venus, Earth and Mars. The inferior planets (Mercury and Venus) orbit faster than the Earth and hence they overtake the Earth. So relative to a fixed Earth-Sun direction we see these planets move in an anticlockwise direction as observed from a viewpoint high above the Earth's north pole.
The inferior planet emerges from "behind" the Sun (superior conjunction), moves out to the maximum eastern elongation (when it can be seen as an "Evening" star) and then moves back to pass between the Earth and the Sun (inferior conjunction). The inferior planet then emerges from between the Earth and the Sun (inferior conjunction), moves out to the maximum western elongation (when it can be seen as a "Morning" star) and then back to pass "behind" the Sun (superior conjunction). The complete cycle (the synodic period) is 116 days for Mercury and 584 days for Venus.
Mars as a superior planet moves in the opposite sense. The Earth orbits faster than the planet and hence relative to the Earth-Sun direction the planet moves clockwise. The planet emerges from "behind" the Sun (conjunction) into the morning sky, moves slowly to western quadrature, then to opposition (Sun-Earth-Mars are then in a line), moves to eastern quadrature and then disappears slowly into the evening twilight as it moves to conjunction. Jupiter and Saturn behave the same way. The complete cycle (synodic period) is 780 days for Mars, 400 days for Jupiter and 378 days for Saturn.
At conjunction, the planet is effectively behind the Sun. It rises and sets with the Sun. At western quadrature, the planet is at right angles to the Earth-Sun line (due West of the Earth). It rises at midnight and sets at noon. At opposition the planet is opposite the Sun in the sky. It rises as the Sun sets and is highest in the sky at midnight. At eastern quadrature, the planet is at right angles to the Earth-Sun line (due East of the Earth). It rises at noon and sets at midnight.