In many countries it is possible to bring your bike on the train, but the rules for this vary depending on the country you travel in and the type of train you take. For example, you may take your bicycle with you on most regional trains. However, many high-speed trains don’t offer this option. On the trains where it is possible, you usually need to purchase a special ticket at the train station (a few railway companies do sell these tickets via their websites as well) before boarding the train.
When using the Rail Planner App to plan your trip, you can add a filter to show only trains that allow bicycles on-board (filters available in the “Planner” and “Stations” sections). As an alternative, this online timetable allows you to select the option “Only show connections that allow carriage of bicycles” when searching for train connections.
For more information on travelling with a bike, you can also check the website(s) of the railway carrier(s) you're planning on travelling with.