Take a particle whose horizontal position is one sine wave and whose vertical position is another. Vary their frequencies and relative phase. The trajectory is a closed curve when the frequency ratio is rational, and never closes when it's irrational.
$$ x(t) = A\sin(at + \delta),\quad y(t) = B\sin(bt) $$
Before oscilloscopes had digital readouts, you'd hook two signals to the X and Y plates of a CRT and read the frequency ratio off the Lissajous figure by eye. Two perfectly tuned signals lock into a stationary curve; if one drifts, the figure rotates slowly, and how fast it rotates tells you the drift rate.
Try 3:5 (the default) — a tight knot. Try 1:1 — a circle (or a line, depending on phase). Try 7:9 — something that looks like the trace of a thoughtful spirograph. The phase-drift slider controls how slowly the figure morphs as the relative phase slips, which is the part that turns the math into a movie.