To remove rust from parts, remove them from the guitar, and soak them in WD-40. Hit them with a toothbrush after they have soaked for about 15 minutes, then rinse them off with clean WD-40.
After you have removed the rust, use some light gun oil on the parts so that there is a thin film of oil over them.
Most of the time, the only parts that rust are the "little black parts" of the Floyd Rose in the bridge and the nut. If you have a standard trem, usually the set screws are the first to go. In very severe cases, the chrome or nickle plating starts to chip or rub off, which will allow the metal underneath to rust.
This is very easily preventable if you simply wipe down your guitar regularly. Some people say "Wipe it down every time you play it." I personally think that may be a little neurotic. Just don't let those critical components get dirty. I usually try to put some light gun oil on those trouble pieces once a month to keep them from getting dry. Once they get dry, they want to absorb whatever comes in contact with them, which is usually the sweat from your hand, which is an excellent electrolyte. Electrolytes are what is needed to make corrosion possible. By covering these trouble spots with a light coat of oil, you prevent the sweat from making direct contact with the metal.
Take special care to clean away any dirt or build up from around these small moving components. While the oil helps protect the pieces, it also has a tendency to collect dust and fibers from your guitar case liner.
In short, it's just a simple matter of good housekeeping.