According to the International Association of Certified Home Inspectors, nails made from iron or steel rust quickly when exposed to salt water. Nails are made from a variety of materials, including iron, steel, galvanized steel and stainless steel.
Plain water will cause iron nails to rust with repeated exposure, but oxidation will occur faster when iron nails are exposed to salt water. According to Let's Talk Science, the electrons and ions from iron interact with water readily when salt is present. Iron nails also oxidize quickly when exposed to liquids that are very acidic. Liquids with high acidity levels include vinegar, cola and acid rain.
When water mixes with carbon dioxide, the result is a mild acid that promotes oxidation. Carbon dioxide is readily available in the environment. Air and soil will also cause oxidation but at a much slower pace than acidic liquids or salt water.