You will need:
Rusty nail science experiment
Rusting occurs when a metal is exposed to oxygen. The brown substance you found on your nail is call Iron oxide and is the product of the iron in the nail reacting with the oxygen in the air or in the liquids.
The salt and acid solutions acted as electrolytes. An electrolyte is any substance containing that free ions (charged atoms) that allows the substance to conduct electricity. If the nail was submerged in an electolyte it caused the iron to lose electrons more easily and so allow ocygen to bind with the iron more easily which speeds up the rusting process considerably.
Weird fact: Try boiling the water first; this releases a lot of the dissolved oxygen and so you'll find that the nail will not rust as much!
You can also try wrapping the nail in Copper wire and Magnesium strips (if you have access). You should find that the nail wrapped in copper rusts quickly where as the nail wrapped in Magnesium doesn't as the more reactive Magnesium acted as a sacrificial anode. Boats and other marine equipment have sacrificial anodes to help protect themselves from seawater corrosion.