Constraints are a modeling language for mechanisms
In multibody dynamics, constraints are not just mathematical restrictions. They are the language used to describe how a mechanism is assembled.
A revolute joint, slider, ground connection, gear relation, or prescribed driver can all be represented as equations of the form C(q, t) = 0. Those equations define which motions are allowed and which directions are blocked.
Once the mechanism is expressed this way, the solver can derive velocities, accelerations, and reaction forces from the same model.
Related: