How water sensors work?

How water sensors work?