It's hard to hitchhike on trains. But there are ways to get free train rides.
If you're in an organised hitchhiking competition...
...then it is very possible. Choose your train and wait at the platform. When the train arrives, work out who the conductor is and run up to him/her. Explain your situation (using an 'international language' such as English often works best, often better than speaking the conductor's native language), show them some documentation for your competition and don't be afraid to beg. Telling a story about a dangerous experience two hours ago on the roadside (true or not...), and how much you want some safe and secure travel after the traumatic experience, works well. By this time, the train is now running nearly a minute late and there is a good chance that the conductor will say Yes, because he needs to end the conversation and keep the train moving. So get in, sit back and relax :).
Tom and his two team-mates tried using this trick when travelling through the Netherlands and Germany on Sheffield University's 'Bummit' hitchhiking competition. 9 out of 13 conductors we asked said Yes, and let us travel as much as we needed on their trains. It didn't work when the train was either crossing an international border, or it was a high-speed train, or the conductor just didn't want to bend the rules...
Looking bad, smelling bad, having no luggage, hopping on the train last are the things that can instantly attract attention. If you really cannot do anything about your suspicous appearance, it's best to note when your train is coming and take a walk, instead of waiting at the station. If there is somebody standing at the entry to the platforms looking whether everybody is validating tickets, see if there is another way to get there - such as getting over a fence. You have to look where the inspector is - at the start or the end of the train - go to the other end. If you really don't know - sit in the middle of the train and keep an eye for the conductor. When he's coming, run the opposite direction. You can hide in the toilet if it's possible to close the door without locking it. If the inspector is checking tickets at a particularly long stop, the toilet is your only option not to get caught. If you made it to next stop, there is no reason to get out instantly, the conductor in most cases is going to get off the train while the train is standing in the station and you can run to that part of the train which the conductor has already checked. If caught, deny having money or an ID. When choosing which train to take, opt for express trains - those with fewest stops, as you are unlikely to get far with regional ones - and you may get stuck in a station where almost no trains stop. It's very useful to memorize (or write down) the timetable, so that you instantly know which is the best train to take after you get kicked out of the previous one.