Resonant orbits occur when there is a relationship in the orbital periods of two bodies. One common type of resonance is known as orbit-orbit resonance, where there is an integer ratio between the periods of two smaller bodies around a common large body.
For example, the 3 innermost Galilean moons of Jupiter have orbit-orbit resonance, where for every revolution of Ganymede around Jupiter, Europa goes around twice and Io goes around 4 times. As a fun fact, with just binoculars it is sometimes possible to see the Galilean moons from anywhere with reasonably dark skies! And the positions of the moons do visibly change from night to night.
Writing these resonances as a ratio, there is a 4:1 resonance between the orbits of Io and Ganymede, and a 2:1 resonance between the orbits of Europa and Ganymede. Since the ratio reduces to some integers, these orbits are in fact examples of orbit-orbit resonances!
But what do these resonances look like? The video below shows two views of a 5:1 resonant orbit, modeled in the relative two-body problem formulation. In this video, the resonance is with respect to Jupiter's orbit around the Sun. The animation on the left shows the trajectory of this orbit (and Jupiter's) when viewed from an inertial observer, i.e. one that remains "fixed" in the system. As expected, the (red) resonant body goes around the Sun 5 times for a single rotation of Jupiter (blue). This trajectory looks much more interesting when viewed in a rotating frame, which is what is shown on the animation on the right.
The rotating frame is defined such that the x-axis is always pointing from the Sun to Jupiter. In essence, if you were to rotate at the same rate as Jupiter rotates around the Sun and plot the resonant body's trajectory from that point of view, you would get the animation on the right. As Jupiter moves in a circular orbit around the Sun, it remains fixed in this rotating view, as by definition it remains on the x-axis. And here we see some very nice flower-like geometry emerge, which makes it clear that we have a 5:1 resonant orbit, and which would be very difficult to notice if we kept our observations to be solely in the inertial frame.
Note that the size of the Sun is not to scale
Much fun can be had by looking at resonant orbits in the relative two-body model and seeing how different orbital parameters affects the resonant orbit geometry in the rotating frame. For example, changing the eccentricity (i.e., how elliptical or circular the orbit is) of the orbit results in larger "lobes" in the rotating view, due to there being larger differences in velocity throughout the resonant body's orbit. This effect is shown in the video below, now for a 5:3 resonance with Jupiter around the Sun. How other orbital parameters affects the rotating view orbit is left as an exercise to the reader ;)
As a final two-body resonance example in the rotating frame, the figure below show some different resonances.
Resonant orbits in the Circular Restricted 3-Body Problem
The Circular Restricted 3-Body Problem (CR3BP) is a mathematical model for the motion of a very small (not massive) body in a system with two large masses (generally called the system primaries). An example of a CR3BP system is the Earth-Moon system, where a spacecraft would be subject to the gravitational forces of both the Earth and the Moon. This is different from the 2-body model, as now the influence of the Moon will affect the trajectory of the spacecraft, while in the two-body model the Moon is just another massless body (if considering trajectories around the Earth).
While finding resonant orbits in the CR3BP is a topic for another day, there do exist resonant orbits in the CR3BP. In the CR3BP, orbits are divided up into families, where there is a family of 1:1 resonant orbits, 1:2 resonant orbits, and so on. Families of orbits are orbits which all share similar characteristics and have similar geometry/structure, and some planar resonant orbit families in the Earth-Moon CR3BP are shown below:
There are also some spatial (meaning they move out of the plane that the two primaries rotate in) resonant orbit families. An example of such a spatial family can be interacted with here, for a 3:1 axial spatial resonant orbit.