The reason salt has been popular in Freshwater Aquaria for years is because of it's ability to help ease osmotic pressure in fish. All fish have an osmoregulatory system which they expend energy to 'osmoregulate', in order to balance the dissolved solids within their blood with the body of water surrounding them.
When you add salt to the water, it aids the fishes ability to osmoregulate, allowing it to expend more energy on other functions such as disease control.
The fishes need for salt depends greatly on it's natural habitat or it's environment of origin (captive breeding in salty fish farms).. South American fish that dwell in blackwater, tend to suffer from a high amount of dissolved solids in the water... on the opposite end of the spectrum the anodromous and brackish water fishes, such as many common livebearers, benefit greatly from added aquarium salt.
Further beneficial effects include inhibition of
nitrite uptake, promoting the slime coat, and helping in healing wounds.
As far as it being a disease preventative in it's own right, it's very weak. Small doses can have an effect on weaker parasites, such as Ich.. but you will need a strong dose, such as a 'salt dip', in order for it to fight off many of the more serious protozoas.