Bolts are the in-game currency to buy upgrades in the Endless game mode. During every stage, you can get three bolts. Every time you make it into the next station you get a bolt. If you complete the mission given to you at the start of the new stage, you will get a bolt. The last bolt is always hidden somewhere in the stage.
The bolts can be used for various upgrades to your train. You can either upgrade an already existing wagon to perform better. You can buy a new wagon that can fulfill another task or you can upgrade your engine. Upgrading your engine will slow down the train and will allow you to move into a new biome.
Special (orange) bolts are available only once per biome and count as two regular bolts. They are furthermore necessary to unlock the final engine.