Wait, if possible, for the train to stop. This is especially important when crossing between freight cars, which don't have walls or connecting tubes built around the connection points between cars and so present a risk of falling at the crossing point.
Look ahead along the rails for curves or anything that could change the speed of the train. Wet rails, ice, oncoming trains and tunnels could all cause the train to brake and you might risk upsetting your footing as you cross between cars.
Examine the crossing platform and railings before using them. Look for any missing pieces, broken or damaged metal or loose components. If you see any of these, cross with extra care or avoid crossing at all.
Hold onto grab bars and safety railings when crossing between passenger cars, and only cross between freight cars that have end platforms and handholds installed. Stepping onto the couplers between freight cars is not safe and should be avoided.
Keep a hand on a railing or grab bar at all times when moving aboard a train, and pay attention to the surface you are walking on. Oil or grease from the train can make the metal surfaces of train car connectors slippery.