|MadSci Network: Biochemistry|
You are right in that this is a sort of a chemical reaction, but not really, in that no actual physical change is occurring to the chemicals. The reason that they foam is a process called osmosis. Osmosis is a fundamental process that is involved in many branches of biology as well as chemistry. The term osmosis describes a type of diffusion (diffusion is when a chemical moves from an area of high concentration to a low concentration, such as adding dye to water, it spreads out) involving the net movement of solvent (the liquid part) molecules, as opposed to solute (the things dissolved in the liquid) molecules, across a semi-permeable (that lets something's but not others through) membrane from an area of high water/low solute concentration to an area of low water/high solute concentration (hypotonic). In this case the semi-permeable part lets water across the membrane but not the dissolved chemicals. All organisms are in state of osmotic balanced; you are at the moment. The reason you get thirsty is that you lack water and your cells are depleted of it and shrivel up. So how come you don't foam if you put salt on your skin. Well you skin is unlike a slug. One of the critical steps in evolution was the development of our skin, which is flexible, hard wearing and prevents water from escaping. But slugs didn't evolve this far. Their skin does not prevent water from passing across it; it acts as a semi-permeable membrane. So if you add salt to a slug you change the osmotic balance across the membrane. Now the slug has lots of salt (solute) on the outside in the water. So effectively that water is less concentrated (it has other things in it) relative to the water inside the cell. So the water inside the cell rushes out across the membrane to make things equal. This makes it look like the slug is foaming.
Try the links in the MadSci Library for more information on Biochemistry.