Modern trains use electricity as their fuel.
Electricity can be used to replace the fuel and power a rocket (using today's mechanism) just like an electric car.