Spray the entire length of chain in a light oil, like WD-40, and let it soak in for a couple minutes. After this, wipe the chain with a clean cloth hard enough so that the rust comes off. It's important to remember that while the WD-40 takes the rust off, it also takes off any remaining lubricant as well. So after you clean the chain with the WD-40, oil it with a bike chain lubricant. NEVER use WD-40 as a bike chain lubricant, only use it for cleaning the chain.