The freight companies and Amtrak keep an eye on the weather at all times. I imagine if there is a tornado warning for a particular area, all rail traffic would be halted before entering that area.
If the train is already in that area, well, keep statistics in mind. You have a train going approximately 79 mph, depending on the area it's in, and the tornado might not be heading straight for it. So, there's a chance the tornado will miss it. If the tornado is coming straight toward it, from any direction, there's only so much a train can do.
If it's really close and appears it's going to hit the train, get into a safe position in a safe area (i.e. away from windows) and cover your head with a pillow/blanket/coat. If you're in Coach, cover your upper body too, if possible. If that luggage starts flying around, you don't want it to hit your head or rib/abdominal area. If you're in a roomette, use the bedroll as protection. If you have time, then the safest place would be either the shower room or one of the restrooms.