You can usually take bicycles with you on the train, except on many ICE (high-speed) trains. In theory space is limited but in practice this has never been a problem for me. For trains that cross borders it's more complicated: some trains (usually the slow ones) accept a limited number of bicycles (between 4 and 60 depending on the train; reservations are strongly recommended) but many won't, so you will have to send them ahead a week earlier. They will tell you it takes three days but always multiply by two. I have once lost a day in Paris because a bicycle was late.
German Railways (Deutsche Bundesbahn) has a very helpful brochure (``Bahn&Bike, Fahrradmitnahme im Fernverkehr'') that lists all international trains that you can use with bicycles (as opposed to sending them ahead), conditions and prices for various European countries, bicycle rental at train stations, and lots of other useful information. German Railways also has a hotline, 0180-3194194, normal business hours only. Their website is quite helpful, I now always book my train rides there.
I have twice used a train in the US. Prices are unreasonably high, travel times are enormous, and service is very spotty. It's just not an option. I used Amtrak on my Crater Lake and Oregon Cascades tours, where we went from San Francisco to Klamath Falls in Oregon because only small planes that do not carry bicycles land there. It was painfully slow and not very comfortable for sleeping but otherwise a pleasant surprise. On the Cascades tour they switched us to cramped buses after a tunnel fire; very uncomfortable but the staff did their best to make it work.
See also article for " shipping bicycle by air"