Violin strings are in regular contact with rosin and with sweat and oils from fingers. This makes it important to clean the strings on a regular basis, to keep them from deteriorating and to avoid loss of sound. Cleaning the strings is a simple, straightforward process, especially if performed after every use.
Keep your violin out after you finish playing and give it a quick visual inspection. You will probably notice some rosin adhering to the strings. This needs to be cleaned off. If left sitting on the strings, rosin may cause them to deteriorate faster than they should. Also, if you allow a thick layer of old rosin to build up, it may actually dampen the sound by impeding vibration.
Wipe the strings down with a clean rag. Clean the entire length of your strings, not just where the bow hits. The parts of the strings over the neck of the instrument need to be wiped down because they come in contact with your fingers. Sweat and body oils may eventually damage your strings. Be prepared, as wiping the strings often causes an unpleasant squeal reminiscent of fingers on a chalkboard. Pressing down on the strings a little with your free hand may alleviate this. Wipe until most of the rosin is gone.
Give the strings another inspection. Pay attention to the undersides of the strings as well. If there is rosin under there, carefully stick your rag between the strings and the body of the violin and rub the undersides. You can also stick a corner of rag between the lower end of the neck and the strings, if necessary, but be careful.
If there is stubborn rosin still adhering to your strings, use a fingernail to scrape it off.
The best cleaner for a violin and its strings is your own spit. Counterintuitive though it may seem, spit is a great cleaner because it is acidic enough to cut through rosin and body oils, but not strong enough to damage the strings or the finish on the body of your instrument. Go ahead and spit on your vioiln, then wipe it off with your rag, giving the strings a final wipe-down as well.
Cleaning your strings after every use is better for the instrument and less time consuming for you than more occasional but more involved cleaning sessions. Even if you don't perform the whole routine as stated above each time you use your instrument, at least wipe the strings down to remove excess rosin before you put your violin back in its case.
It is best to avoid commercial polishes and cleaners on your violin and its strings, even the ones formulated for that specific use. These cleaners may be too caustic and end up damaging the strings and/or the finish. Also, when you are cleaning your strings, be careful not to knock the bridge out of place. Even bumping the bridge just slightly out of place will cause you to have to readjust it and retune your instrument.