St. Thomas describes how it works in Summa Theologica suppl. q. 42 a. 3 (on how matrimony confers grace) ad 4:
A remedy can be employed against concupiscence in two ways.
on the part of concupiscence by repressing it in its root, and thus matrimony affords a remedy by the grace given therein.
on the part of its act, and this in two ways:1. by depriving the ...