Moisture is allowed to move freely in and out of the sensors electrodes as the soil becomes moist or dries up.
The resistance of the electrodes to the flow current is correlated with moisture content.
To measure this resistance the electrodes are biased (energized) with a dc voltage and the current flowing through them measured. Applying Ohm’s law;