At the risk of being flamed by the “polishers”, that may not be necessary for all. If it works for you, great, but in some cases (including mine) it’s not all that attractive.
As previously stated, a main contributor to dirty track is wheels. Loco wheels and car wheels, especially plastic wheels. If you clean your track, clean every wheel before putting back on the nice clean rails! And replace the plastic ones.
Other contributors are dust, dirt, and humidity, plus just not running trains very often. Fortunately, my current layout is in a great environment – little dust & dirt, temperature-controlled.
I only have to clean about every 18 months, with acetone on Q-tips for the wheels, and acetone on the pad of a CMX Clean Machine http://tonystrains.com/gallery/cmx_section.htm.
I pull (not push) the CMX over about a hundred feet of track with a pair of diesels, then change the pad, clean it’s wheels, and run it again over the same track. Then repeat for the next hundred feet or so. Of course, your mileage may vary [:D]
You do have to be careful with acetone, of course. It’s an amazing solvent, thus gets all sorts of dirt, crud, and who-knows-what off rails and wheels, and leaves no residue. But it is very flammable, and is not at all good for human lungs, but if you are careful to have good ventilation, it’s teriffic.