Create a brush thats large enough for the player to stand in and place it where you want the player to control the train and turn into a func_traincontrols entity.
It's best to make the train first. Note that the train has to be a func_tracktrain with an ORIGIN brush in its center. Make sure you configure it properly (speed, first stop target, angles and all that).
Then set the Train name of the func_traincontrols entity to the name of the func_tracktrain.