Gravity Can Flip Orbits Upside Down
A distant third body can pull an orbiting planet into a wild shape-shifting dance. By trading its tilt for its roundness, an orbit can become incredibly stretched or even flip to move in reverse.
This phenomenon occurs because gravity acts like a cosmic tug-of-war between three objects. Over vast stretches of time, a distant companion star or planet can force a closer partner to trade its circular path for a long, thin ellipse. In extreme cases, the gravitational nudge is strong enough to turn a forward-moving orbit completely backward. It is a slow, rhythmic cycle that constantly reshapes the architecture of solar systems far beyond our own.
Source: Kozai mechanism