The reason that salt is used as a natural preservative is because it has the ability to draw water out of other substances and cause them to dehydrate. The best example of this is a jar of pickles. Without the salt the jarred pickles would be soft and mushy. The pickles wouldn't take long before they went completely bad. The salt keeps the pickles dryer and more crisp, and for longer periods of time. Understanding how salt works is an important part of understanding how it can cure a sore throat.
When your throat is sore contains inflammations called edemas. These edemas are filled with water and bacteria. The bacteria are what makes you sick. Gargling with salt water gets the salt to the back of your throat where it can attack the edemas by dehydrating them. When the salt dehydrates the edema it takes the fluid out of the edema. The bacteria can not survive without the fluid so the bacteria dies. If there is no bacteria to keep you sick you will then return to optimal health. So while the salt isn't actually doing the curing, it is taking away the very thing that allows the bacteria to stay alive.
If you are suffering from a sore throat and you want to try and cure it the old fashioned way, you should use a warm salt water rinse. Fill your cup 1/3 of the way full with warm water. Add two tablespoons of salt and mix well. Gargle with the water that is in the cup. The longer you gargle the better. If you are suffering from a sore throat you will want to gargle at least four times per day. Every other hour is best for severe sore throats. You should also always check with your doctor to make sure you don't have strep throat.