This section is from the "The New Student's Reference Work Volume 5: How And Why Stories" by Elinor Atkinson.
A great many boys will think they know the answer to that. They will say it is because of the rim, or flange, that is on the inside edge of the car wheel. That rim merely steadies the car—keeps it running smoothly. But notice the next time you go to the railway station, that the rail is not flat on top. It is slightly rounded. If a freight car is standing on a side track you will see that the rim of the car wheel is not flat, either, and it does not rest squarely on the top of the rail. Beside having a ring-like flange on the inner edge, the broad rim of the wheel slants much like a cork that is made smaller at one end so it can be pushed only part way into a bottle. The outer circumference of a car wheel is smaller than the inner. And the wheel rests on the inner slope of the rounded rail.
In running, the wheels press outward. That is, the wheels opposite each other push outward or away from each other. This is because it is easier for them to run along the smallest edge, and on top of the rail. By pushing outward, with the same force in opposite directions, they keep each other balanced and on the rails.