I bet most of you reading this article thought this must have a fairly simple answer. You may have had started theorizing about the wheels and how they might have a little edge guard to keep them straight. Maybe you reasoned they might have a shallow groove that makes them stay lined up on the rails. After all, those ideas do make sense if we assume the train is going down a straight track.
What if a train has to turn?
Try walking in a circle. If you do, you will notice your outside leg will be taking bigger steps and moving farther than your inside leg. Obviously, for anything to turn, one side will need to move farther than the other. Now you are probably thinking back to your previous ideas and how they would need to be modified in order for the train to actually turn.
Maybe it is like a car and uses a differential to make the left and right wheels spin at different rates. However, that is not the case. The wheels are both connected by a solid metal bar. So with this in mind, how does a train stay on the tracks?
My guess is most of you are still stumped. I certainly was when I was asked these questions.
The answer is surprisingly simple. The wheels are slightly tapered and they shift over when turning which allows the outside wheel to rotate around a larger diameter than the inside wheel. Then the wheels shift back to the center when the track straightens out.
Here is a visual example:
Richard Feynman, one of the greatest physicists of all time, explains in this video.