As mentioned, these orbits are known as orbital cyclers or cycler trajectories and (in theory) can be found between any two bodies. They are orbits that closely approach the two bodies at regular interval without requiring large trajectory adjustments.
In fact, there will be many possible cycler trajectories for two given bodies, determined by integer multiples of their synodic period - the time between subsequent conjunctions.
For the Earth-Mars system, the most famous cycler is the Aldrin Cycler (Dr. Buzz Aldrin of Apollo fame), which corresponds to a synodic period of 1 (approximately 2.135 earth years).
An Earth-Mars cycler may be particularly useful for manned interplanetary travel. Heavy equipment such as life-support, radiation shielding and accommodation can be left on the ‘cycling’ craft and a smaller, lighter vessel can be used at either end of the journey to decrease relative velocity and enter orbit around the planet.
See this question for more detail on the usefulness of this system.