Gravity does the rest - the cars aren’t powered.
However LEGO Power Functions is replaced by LEGO Powered Up which is BlueTooth controlled. The same system controls products branded LEGO Technic, LEGO Boost, LEGO Ideas, LEGO Robot Inventor...
> using open source library that has all required apis
> The act of engaging in activities (such as programming or other media) in a spirit of playfulness and exploration is termed hacking.
The source is a single HTML file that also contains the JS. Just view source and modify if you're interested in taking this further. What's cool is that the protocol allows you to receive readings from the train and not just send commands. Also, it allows you to drive the train faster than you can via the official mobile app.
(M-x voice-hack-mode)
The train base is actually the same as the Duplo truck base so you can put a truck body on it if you wanted.
And as to the answer, steam train go Choo Choo.
I love it. The video is even better than the blog post IMO.