That's lighter fluid (naptha), piece of cloth (cut from an old bed sheet), block of wood and a toothbrush. The boxcar is just for size reference.
To those familiar with their N scale history the boxcar is actually one of the original "Class of '72" boxcars from (then) Kadee. (It just happened to be handy when I took the photo.)
To clean track I wrap the cloth around the block of wood, and then squirt on some lighter fluid:
Then I gently wipe it over the rails. I take care with the point blades of turnouts as the cloth can catch on the blades, and dislodge them if I'm not careful.
Regularly squirt on more lighter fluid.
This gunk came from just a few metres of track which I thought was pretty clean beforehand.
Notice how the threads have been pulled by catching on point blades. From time to time, threads will be completely pulled out, so when I'm done I vacuum the layout to remove them (and any other debris) before they get caught up in loco trucks, turnout point blades, etc.
To clean loco wheels it's important that you use thin cloth so it can conform to the corner between the wheel tyre and the flange. Lay the cloth across some track and turn the throttle up to full. Then hold the loco so that one truck sits on the powered rails and the other on the damp cloth:
Gently move the loco truck from side to side between the rails so as to clean the entire wheel surface and the flange. When the wheels on one truck are clean, swipe the rails, and then repeat the process on the other truck. When you're done the wheels should be clean, and the cloth should like something like this:
Finally, the toothbrush. I use it to brush away any grot or debris that gets caught between the point-blades and the stock rail. If there's a really stubborn problem I squirt on some lighter fluid before brushing.
Well, there it is. I hope it helps somebody.