If you play guitar infrequently and your guitar stays in its case most of the time, you will likely notice rust forming on your guitar strings. Most strings are made of a nickel alloy that will rust over time. If the rust is severe, you are better off changing the strings with a replacement set. If the rust is light, you can recondition the strings so you can get additional life out of them.
Slide a cotton towel between the fret board of the guitar and the guitar strings. This will prevent you from pressing the strings against the frets as you clean.
Spray the surface of the strings with a commercially available guitar string cleaner such as those available from Planet Waves, GHS or Fender.
Rub the length of the strings with a microfiber cloth to remove the rust stains from the strings. The strings will dry off quickly so add more spray as needed. Move to a new section of the microfiber cloth as the cloth turns brown. Repeat this until you no longer get brown on your cloth.
Remove the towel from between the fret board and strings.
Keep a microfiber cloth in your guitar case and wipe down the strings after you play. This will prevent rust from forming on the strings and minimize the amount of work you must perform before playing.