How do variable current limiters work in power supplies?
That's a broad question, so I'll give a broad answer.

Just like the control system in the supply measures the output voltage so that it can decide whether to crank the supply up or down to keep this voltage at the setpoint, it also measures current and cranks the supply down if the measured current exceeds the setpoint.

Basically the supply regulates to a fixed voltage or a fixed current, whichever it encounters first.