Mercury has the most noncircular or eccentric orbit of any nondwarf planet in the solar system. This eccentricity has trapped Mercury in a 3:2 spin-orbit resonance, where it rotates three times for every two revolutions. When nearest Sol at perihelion, Sol’s tidal forces are greatest, Mercury’s spin and orbit (or rotation and revolution) match, and Sol momentarily stands still in Mercury’s sky.
For long times, Mercury’s orbit precesses due to the gravity of Jupiter, the oblateness of Sol, and spacetime curvature, first described by Albert Einstein’s theory of General Relativity. For short times, as the animation shows, one solar day lasts two years!