“How it’s done” is an implementation question, not a game design question. But, yeah, most likely the background is moving under the train. You generally want to keep action (and the camera) near the origin as much as possible. It doesn’t matter within the first couple thousand units, but if this train is traveling at 60 kph and the level lasts more than a few minutes, you could start to get out to where it matters.
I think it depends on what works best for you. You could go platformer style and stick the charactor onto the train (parenting it) -or- make use of a tiling terrain that moves (as JoeStrout suggested).
Wow! A few other persons, asked similar questions to this, in the physics section of this forum. It was fun helping them though
Okay, to answer your question, I have no idea how they did it in that game.
But one good way to do this:
Is to make a large (single mesh) outside non-interactive enviroment,
like a desert etc. and make that enviroment move.
But, keep the train stationary. Meaning that the train does not move
but the wheels of the train, are animated to spin, to give it the illusion,
that the train is moving, through a big desert etc.
Doing it this way, might make it easier for the character, to move all
over the train, with ease. And of course, the camera should be made in
a way, to follow the player character.