The Earth's close encounters with Mars occur periodically as Earth passes Mars in its race around the sun.
Because Mars, the fourth planet, is farther from the sun than is Earth, it requires 881 days to orbit the sun. Earth, the third planet, takes only about 365 days. As a result, Earth "laps" Mars on the orbital racetrack about every 780 days.
Each time Earth "passes" Mars, moving to a spot directly between the sun and the Red Planet, as it is now, the configuration is called "opposition."