Here is a picture of the notorious 'bogie changing shed' at Brest at the Border between Poland and Belarus. The Russian Railway Gauge is 1,520 mm (4 ft 11+27⁄32 in), whereas in Poland it's 1,435 mm (4 ft 8+1⁄2 in). Since you stay on the same train all the way from Poland to Russia, you have to swap the European bogies with the Soviet ones as you cross into Belarus. All this is done while you remain on board of the train.