Bringing the bike on buses and trains can be one of the fastest and cheapest ways to move out from an large urban area towards an rural one. When compared to flying with bicycles, Bus & Train travel tends to have several advantages: less overhead, the bus/train stations tends to be better located, more flexible rules, it can be cheaper and there's less CO2 footprint.
However, there are still aspects to have in mind. Specifically, the land transportation system can be quite heterogeneous in terms of rules, comfort and experience. Travelling through bike-friendly train / bus companies can be one of the smoothest experiences that one can have. At the same time, there are companies that can actively hostile towards bringing bikes.
This article will provide you what you should expect and how should you prepare to travelling with trains & buses over different countries across the world.
Rules for bringing in the bike
Italy - Trenitalia
Trenitalia has essentially four tiers that one could take: Frecciarossa, Intercity, Regionale and Intercity Night. There's also the international trains that have an specific ruleset for each destination.
By default, Trenitalia allows anyone to bring bikes that are "disassembled and contained in a bag or a fully closed folding bike" as long the size doesn't exceed 80x110x45 cm (Just a tiny smaller than most cardboard boxes). This applies to Frecciarossa, Intercity & Regionale trains.
On some Regional trains, there are parklets that can be purchased separately. This allows to bring the bike assembled and without need to be covered. Typically, the price is around 5 EUR.
Brazil has an nationwide law for inter-state bus travel that enforces that luggages should be transported free of charge provided that they are below 23 kg, 300 cubic decimeters and has an maximum dimension of 1 m. Also, excess fees are regulated for the case of overweight, but not for oversize. Normally, bikes does have an lower weight and volume than that while having an dimension that is close but larger than the maximum dimension. In practice, this creates an limbo on which some companies choose to be actively friendly or actively hostile to bike transport, while the majority of companies simply don't have any rule whatsoever with the bike transportation being conditional on the bus driver goodwill (which is usually the case).
Some bus companies that are known for transporting bikes with no strings attached (and without requiring disassembly / packaging) are: Catarinense, 1001, Viação Cometa and Pássaro Marrom. Some other bus companies that are known for being actively hostile towards bikes (by asking for rigid cases, "nota fiscais" & extra fees) are Eucatur and Expresso Nordeste. There's an partial list of bus companies and reviews for them at 
For companies with unclear rules, getting on the bus with the bike disassembled (eg. front wheel removed and attached to the frame) and packaged (on an plastic bag) will do the trick most of the time.
It is possible to ask the company channels for what are the rules, although most of the time it is inefficient. They are going to take forever to do it and will provide ambiguous or overly restrictive answers. Especially if is asked in written (e-mail & messages) channels rather than oral (phone or talking in the balcony).