Salt is not food. So body tends to retain salt.
Excess salt also makes us very thirsty and we drink more water which gets retained.
Hence it is best not to add salt to cooked food while cooking. Small amounts, can be added afterwards.
To remove excess water in body (as in the case of overweight people) eat raw (and unsalted) positive foods like fruits and salads.