The term epicycle was used for the supposed small circular motion of planets in their apparent large circular motion around Earth. The epicycle concept explained retrograde motion (motion in the opposite direction) of planets, that against the celestial sphere, the planets moved opposite their usual direction on occasion. The large circular motion/orbit was known as the deferent, and the planet itself apparently moved in a circular motion, an epicycle around the point in space that follows the deferent.
Ptolemy added the concept of equants, adjusting the center of the deferent orbit and explaining the observed orbital speed. This system came close to explaining the observed motions of planets, finally to be set aside when heliocentricity (that planets orbit the Sun) and the ellipticity of orbits were worked out, by Copernicus and Kepler.
The term epicycle has more recently been used to indicate characteristics of some orbits of circumstellar disk material around stars and of stars around galaxies, and orbits around stable Lagrangian points, to indicate much the same thing: relative circular motion around the Keplerian orbit. The term epicyclic frequency (in the case of orbits around galaxies) indicates the number of small circles completed for each large circle completed.