Mercury circles the Sun every 88 days, but seen from Earth that produces a rhythm of about 116 days. It swings out from the Sun as an evening star, then seems to stop and run backwards against the stars for about three weeks: a retrograde. During the retrograde it passes by the Sun to become a morning star before turning around again, slowly returning to the Sun, and starting the cycle again.
The retrograde is a trick of perspective—in reality, fast-moving Mercury is passing between the Earth and the Sun, overtaking us as it zips around its smaller orbit. To an astronomer on Mercury, it would look like it was the Earth who was going backwards.