Hi Newbie,
Kiwirail's tip works in a lot of cases, even if you don't have an ultrasonic cleaner (but do have a dish/container deep enough for your loco). One precaution, however, is to remove the locomotive's shell from the chassis first, as motors might not clean up well...
That may involve some disassembly, so check and see if there are tabs to lift, screws to undo, etc. to remove the shell from the main chassis (and the motor assembly). You may need, depending on your model and brand, to do some hand work carefully on parts of the chassis where there may be paint close to the motor/wiring.
Even with the isopropyl alcohol, you may still need to take an old toothbrush to get the paint out of grooves, nooks and crannies. I had a water tower (given to me) which the alcohol barely fazed, and I went to Scalecoat (commercial product), which got more off in my case. I didn't think I had enough Scalecoat (and/or was too cheap to spring for another bottle of it), but by rotating the item every few hours (and using the toothbrush on the exposed part while the rest was soaking), I got almost all of the paint off so it was ready for repainting.
Hope that helps.
CapeJim