Some European borders are crossed in minutes and others take the better part of an hour, with the train standing still. Track gauge is often the reason.
Gauge is the distance between the rails
Most of Europe uses a common gauge, but several networks were built wider or narrower, in some cases deliberately to complicate military movement across a border.
Those decisions were made in the nineteenth century and are effectively permanent, since regauging a national network is a generational project.
A vehicle built for one gauge cannot run on another without either changing its wheelsets or having wheels that adjust.
Bogie exchange is a physical operation
At a gauge changing station the coaches are lifted, the bogies are rolled out and replaced with ones of the other gauge, and the coaches are lowered again.
The work is done on a whole train at once in a dedicated shed, and passengers usually remain aboard while it happens.
It is reliable but slow, and it requires the equipment and the trained staff to exist at that specific location.
Variable gauge axles are the modern answer
Some trains carry wheelsets that unlock and slide to a new spacing as the train rolls slowly through a changeover installation.
This takes minutes rather than the better part of an hour, but the rolling stock is more complex and more expensive to build and maintain.
Only specific train types are equipped, so a route benefits from it only when those units are the ones assigned to the service.
Sometimes the answer is a new line
Where new high speed lines have been built, several countries laid them to the common European gauge regardless of the legacy network's width.
That creates a parallel network on which through running is possible, with the older gauge retained for domestic and freight traffic.
It also means the fast route and the scenic route between the same two cities can be on physically incompatible railways.
What it means for planning a rail itinerary
A booking engine showing a change of train at a border town is often showing a gauge break rather than a poorly designed connection.
Those changes need a realistic margin, since the connecting service may be a domestic train with its own reservation rules and its own delays.
Where a through service does exist, its journey time already includes the changeover, so comparing it against a connection means comparing total door to door times rather than the running time alone.