Mollies, contrary to popular belief, are actually terrible beginner fish and can be very finicky with water parameters.
It's very important that you have clean, well-aerated water that's free of ammonia/nitrites and has almost no nitrates. Regular water changes are a must with mollies, and sturdy live plants help (they'll eat many of them, so stick to species like java ferns).
The other problem is that it can be difficult to find healthy ones in the first place. Pet store mollies are overcrowded, inbred, and over-bred. Even if you DO find healthy ones, you need to acclimate them slowly rather than just dump them in your tank.
I've had the most success keeping them in brackish aquariums. That would mean buying MARINE salt mix and mixing it into your water to raise the specific gravity to 1.010-1.015 or so (the exact number doesn't matter, and it's allowed to vary with water changes). I like to use crushed coral as substrate, although sand is great too. Just Google "brackish aquariums" and you should get tons of info
What I'm trying to say, is that it might not even be your fault--they can be tricky fish to keep.
As for the infection, I can't say I'd recommend using regular salt right now. I would move the fish to a hospital tank and try epsom salt baths. To give an epsom salt bath, get a small container and fill it with clean water that's the same temperature as the main tank. Add one tablespoon of epsom salts per gallon. Place the molly in the tank for 10-15 minutes, although keep an eye on her to make sure she's not in serious pain or anything like that. Afterwards, slowly acclimate her back to the hospital tank.
You could also try the medication Binox, by Jungle. I've used it a bunch of times and highly recommend it
. I would give a very small dose, though.