Most water pills are Diuretics and work through your system to help get rid of excess water. They go through your blood and and find excess fluid build-up and help to remove it. I take one everyday for an inner ear disease I have. It keeps the fluids from building up and making my ear feel like a water balloon. Always take what your Doctor prescribes. Never just take anyone's pills as the amounts are different for each person.
Mine works by counteracting sodium (the element in common table salt) so that water cannot cling to it. Once released from the sodium, the kidneys can then deal with it. This is why, on high blood pressure diets, one is told to cut back on salt (which is sodium chloride).