Karl Fischer titration iinvolves two reaction:
In the first reaction, an alcohol (usually methanol or ethanol), sulfur dioxide and a base react to form an alkylsulfite intermediate.
In the second reaction, the alkylsulfite reacts with iodine and the water from the sample.

Because water and iodine are consumed in equimolar amounts in the second reaction, if you know the amount of iodine consumed, you know the amount of water that was present in the sample.