Suppose you have a cart connected to a wall with an ideal spring oscillating frictionless back and towards the wall. Now on that cart, you mount a pendulum that can only oscillate orthogonally to the cart’s direction of motion (with a different frequency). This way, the motion of the cart and pendulum are completely independent of each other. Now, consider the motion of the pendulum’s tip in two dimensions and whether it is periodic. Pick an arbitrary state of the system. Both the cart and the pendulum will return to their respective phases, but never at the same time – unless you tune the frequencies of cart and pendulum just right (more on this later). Thus the motion of the pendulum’s tip is not periodic. However, it is not chaotic either: We can perfectly predict it if we know the initial phases of both oscillations. This superposition of two (or more) oscillations is called quasiperiodic.
Now, you can tune the period lengths $T_\text{c}$ and $T_\text{p}$ of cart and pendulum length such that the motion is periodic, namely if $n T_\text{c} = m T_\text{p}$ with $m,n∈ℕ$. In this case, the period lengths (and frequencies) are rational multiples of each other, which is called commensurate. Of course, in reality, we cannot know whether the ratio of two frequencies of two independent oscillations is a rational or irrational number, but then we also do not want to wait forever for a repetition. Thus, incommensurability is an appropriate default assumption. Mind that in many real applications, the oscillations are not independent, but there is a mechanism that synchronises them – making the ratio of frequencies a rational number (with a small denominator). In fact, in any practical implementation of the above example, the two oscillations will synchronise since you cannot make them perfectly orthogonal to each other.
In the above example, it is obvious how to decompose the dynamics into two oscillations, but now suppose that you can only observe the horizontal position of the pendulum’s tip along a diagonal axis (with respect to the axes of the cart’s and pendulum’s motion). Many quasiperiodic dynamics is like this when you analyse it.
A classical example for quasiperiodic motion is dynamics of the moon.
The synodic period (29.53 d), nodal precession (6793 d), and apsidal precession (3233 d) are incommensurate for all practical purposes, originating from processes that are practically uncoupled (thanks to the practical absence of friction in space). As a result, eclipses do not occur regularly, yet we can predict them. By contrast, the synodic period and lunar rotation are not incommensurate (but the same) since tidal locking synchronised them.