Salt water may have anti-septic properties due to the effect it has on water potential. Pure water has a water potential (Ψ) of zero. A concentrated salt solution has a lower (more-negative) water potential. The water potential of the salt solution is likely to be more negative than that of the pathogen's cytoplasm; the salt solution is therefore referred to as hypertonic. Therefore water osmoses out of the cell (osmosis being the net movement of water from a higher water potential to a lower water potential across a semi-permeable membrane). The loss of water from the pathogenic cells causes osmotic crenation - the cell becomes shrivelled and dies.
A hypotonic solution (for example cells placed into pure water) would cause the opposite effect - osmotic lysis. This is the bursting of the cell due to the movement of water into the cell. The bacterial cell wall would first have to be damaged (e.g. by penicillin). This would not be the process by which a salt solution has effect, however.
The fact that the salt water is warm in order to improve solubility may also have the side-effect of causing vasodilation around the infection, increasing the rate at which white blood cells can arrive at the infection site.
It has been more difficult to find a theory as to why a salt solution would have analgesic properties, see the comments below & previous versions of this answer.