Black riding or fare evasion is an illegal way to use public or private transport for free.
The situations do differ a lot according to the country, the means of transportation you are using and the local habits and mentality. Generally, like for shoplifting the more is usual the more it means that it is doable but also that companies do take some precaution, i.e. there are checks; while when is not usual or it is impossible, or people normally don't do it.
Just get on the bus, train, ferry or station and don't buy the ticket. If there is any obstacle (like a barrier) impeding you the entrance avoid it, jump it or pass behind somebody who is paying; if there is a human being asking you to pay then it's a bit more complicated but you have to find a way not to be noticed. Then, once in, behave and pretend as a perfect normal passenger, forget you haven't paid and remember it only when you start to see checkers.
This is the most frequent and easiest means blackrided. In some cities like London and sometimes even in entire countries like in the Netherlands, UK or Turkey it is almost always technically impossible since the ticket is checked by the driver who doesn't let you in if you don't pay it. Some exception though are more than possible view your status of moneyless traveler, some driver may let you in just for some stop or some passenger (e.g. in Turkey) may pay for you. In some city like Paris there are also some blackriders (probably illegal and anonymous, called something like "la mutuelle") association where you pay a monthly cheap amount and you can bring your fine if controlers bust you. Are becoming popular also some mobile app, to inform other blackriders if there are checkers around, similar to those for speed radars for cars.
Trains are normally the most blackrided means after public transport, and especially in certain countries like Italy, Spain or Sweden are very easy to take for free what contrast the little hardness of hitchin. Keep in mind that often trains are long; and normally the checker is one or two. Try to get on the farest part of the train from him/her, then wait, if there is enough people it will take quite a long time to check anyone. The main fact is that (unless you stay on for few time, few stops) You have to "cross" him/her and go to the part he/she already checked. You have two option, one, the most known (also by them, who often open the doors for this reason) and used is the toilet, hide inside and wait they have passed. If not wait until a certain stop, when the train stops he/she has to go down and make a sign to the driver before the train starts again, in that moment you will go to the already checked part.
On night trains, it's a bit more complicated since all the cabins are reserved and registered in advance, though when you'll have succeeded you ll have also a free bed for the night.. Get on early and find a cabin with possibly more than one empty bed (the more are empty the better it is) and a good/cool company that could help you once explained the situation. Hide your luggage among the others' ones. Go and hide in the toilet straight after the train had started or even before, the checkers normally pass at the very beginning of the departure not to bother the passengers after. Wait..it can be long but you have to be sure the checker already controlled the cabin you choosed for your night. Once back, ask the other "cool" passenger if they passed and confirmed there are some free bed. Fede, after having tried to hitch a longride the whole day, on september 2013, found en empty cabin with a very cool german guy who did help him a lot and traveled (even with his very small experience in blackriding and his very not cold blood) from Stockholm to Malmo all the night long with no ticket sleeping kind of relaxed and waking up at his destination.
How to manual https://hitchwiki.org/en/Train
It's a bit harder than the previous but it does work and especially in some expensive country like Norway it does represent a good option to move with no money. You have to mingle with the cars. Stay away from other backpackers/travelers on foot if they have the ticket, if they don't and want to come with you split in small groups. Sometimes (almost always in Norway) tickets are issued and paid on the land by some workers from the company who come to you at the harbour and ask you if you need to buy the ticket. Hide from them and wait for the ferry to come, once they start to board people just go in walking, ticket sellers should be quite busy with cars. This is also one of the few way (with plane hitchhiking from Scotland) to get to Iceland for free from Denmark, to go to Greece from Italy and viceversa or to go around Egean Sea (Greek islands) with no money.