Make Sure You're on the Right Train and in the Right Car
Talk to a clerk or the conductor before boarding. If there's a language barrier, show him your ticket or write down your destination city and ask if you're getting on the right train. Many add or drop cars along the route, so just because you're boarding from the right platform doesn't necessarily mean you're getting on the right train. If there are no assigned seats, make sure the car you choose is going all the way to your destination.
Bring Friends---or Go Alone
Most passengers on trains are friendly, and most trains have a lot of student travelers. If you feel intimidated by chatting with locals across the language barrier, then travel with a friend so you'll be sure to have someone to talk to. If you enjoy meeting strangers, then don't hesitate to travel alone. Students and backpackers are easily recognizable. Chances are that if you meet one, she'll speak English and be happy to chat with a fellow traveler.
Never Leave Luggage Unattended
Trains are a favorite spot for thieves. Always keep your luggage close to you, and if you sleep, clip it to the overhead rail. Keep your passport and tickets on your person at all times, in a zippered pocket or a passport holder around your neck.
Get a Sleeping Car If You're Traveling Overnight
If you're taking an overnight train, spend the extra money---it isn't much---and pay for a sleeping couch. Many trains offer the option of paying for an entire sleeper car, which is more expensive, or simply a couch in a shared car. Opt for the shared car, and you'll have a blanket and a bed for the night.
Bring Your Own Toilet Paper
Train bathrooms vary in quality, so be prepared. Some might not have toilet paper available; others might require you to buy toilet paper. Avoid the problem by bringing your own. You'll also want to have a few small coins in the local currency in case you need to pay a few cents to use the bathroom.
Bring Your Own Food
Many trains have restaurant cars where you can buy snacks or meals, but many don't. If you have a long ride ahead of you, bring enough food for the journey. And don't forget water---some trains don't have air conditioning.