However once the train is tearing through the countryside and rolling about to its merry, there is no way a player may stop it, be it through conventional means or through the use of trainers to spawn in props and objects. In fact, you'd need to dig into the code of the game in order to get the train to stop, and now that's just cheating.
Those of you who have some experience in game development will probably have already figured this out, and don't need any kind of explanation. That said, the vast majority of people who play video games know next to nothing about how they're made, so this is mostly intended for that audience.
Basically, when it comes to in-game assets and objects, items are either static or dynamic, usually. Dynamic objects are tied to the physics engine, and react to external stimuli, such as clipping, collision, movement and such. Dynamic objects in GTA 5 include vehicles, NPCs and you — meaning the player character.
Then you have static objects. Static objects are generally those assets which remain exactly the same, all the time. No external effect alters their appearance or position, beyond possibly triggering the texture for bullet-holes or particle effects and such. In GTA 5, static objects include things like the buildings, the map itself and trees.
And the train. The train in GTA 5 is a static object, hence being unstoppable. But why? Well, that's where mrgame64's explanation comes into play. The reason you can't stop the train with other dynamic objects, like vehicles, NPCs and weapons fire is because dynamic objects have no effect on static ones. That said, static objects do have an effect on dynamic ones, hence the train pushing everything away in its path. And killing you.
As for the reason why you can't stop the train by spawning in other static objects, like trees, is also pretty simple. Static objects are programmed to have an effect on dynamic ones, however, being static, no form of unprecedented interaction between static objects occurs during regular gameplay. Hence, there is no collision between static objects, and the train will simply clip through the trees or whatever it is you put in front of it.