This project (see figure) is a typical version of robot control based on Arduino. Similar schemes you will easily find on the Internet. The only difference is that the output of the motor driver is connected to the rails, and not directly to the motor. Of course, you can use your combinations of bluetooth modules and motor-drivers, as well as ready shields. I recommend the L298N Dual H-Bridge Motor Controller and HC-06 (HC-05) bluetooth modules.
This sketch is based on the example SerialEvent from Arduino IDE. The difference is that еhe processing of the control command is include to the function, and complete the command instead of the end of the stroke (/ n) uses the "z" character. Also Parsing part code convert command to AnalogWrite(speed) and direction moving the loco.
External command consist three symbols. The last symbol is "z". You can come up with your own commands consisting of the first two letters, and sending them, for example, through the Arduino IDE serial port terminal using USB to move the train on the rails. Android application ArduinoTrainBtControl Lite sends commands exactly as well, but via bluetooth. Full description of ArduinoTrainBtControl Lite commands on my site in the section Protocol.
Step-by-step instructions here.
There was a question about the scheme...