Because there is a magnetic force between the train and tracks. This also makes the train more efficient and so there is less friction.
The wheels have flanges on the inside edges, they keep the wheels on the rail. The wheels would not stay on the tracks without the flanges.
Trains run on tracks. The tracks are made up of a pair of parallel rails.
Trains travel on rails ...
Smoke
Tracks
Tracks
Train tracks are not magnetic. They are typically made of steel or iron. However, trains use magnets for various purposes, such as in braking systems and signaling. Magnets on the tracks can help control the speed and direction of trains, but the tracks themselves are not magnetic.
Trains that run on tracks.
Trains drive on railroads or tracks.
It makes them self guiding.
They use freck'in wheels!
They are used for trains to ride on them