The compensation does not actually have to occur (there is no presumption in favor of status-quo) and thus, a Kaldor–Hicks improvement can in fact leave some people worse off.
However, in practice, it is almost impossible to take any social action, such as a change in economic policy, without making at least one person worse off.
Any change usually makes some people better off and others worse off, so these tests consider what would happen if gainers were to compensate losers.
The Kaldor criterion is that an activity moves the economy closer to Pareto optimality if the maximum amount the gainers are prepared to pay to the losers to agree to the change is greater than the minimum amount losers are prepared to accept; the Hicks criterion is that an activity moves the economy toward Pareto optimality if the maximum amount the losers would pay the gainers to forgo the change is less than the minimum amount the gainers would accept to so agree.
Thus, the Kaldor test supposes that losers could prevent the arrangement and asks whether gainers value their gain so much they would and could pay losers to accept the arrangement, whereas the Hicks test supposes that gainers are able to proceed with the change and asks whether losers consider their loss to be worth less than what it would cost them to pay gainers to agree not to proceed with the change.
The criterion is used because it is argued that it is justifiable for society as a whole to make some worse off if this means a greater gain for others.
At a more technical level, various versions of the Kaldor–Hicks criteria lack desirable formal properties.