I suspect it works like any other sail. On an ordinary sailing boat you’re aiming to balance the aerodynamic and hydrodynamic forces as efficiently as possible, if you’re heeling over too much you can reduce the power produced by the sail by changing the sail’s angle to the wind, by reefing the sail (which reduces the sail area exposed to the wind) or by changing the angle of the boat to the wind (a less upwind course means less heel).
Sailing boats with a keel usually resist capsizing because as they heel over the keel is pushed to windward at a greater angle, increasing the righting force it provides to the hull. Additionally the greater angle of heel decreases the area of sail that’s being exposed to the wind, further increasing the overall effect of the righting force. It would be interesting to see how these can be retrofitted to an ordinary cargo ship though, sailing boats are optimised for a particular amount of heel whereas as far as I’m aware cargo ships generally aim to avoid heel altogether as far as possible with large ballast tanks where water is pumped around.