By the early 1800s, high pressure steam engines had become compact enough to move beyond the factory, making the first locomotive hit the rails in Britain, in 1804. In case you didn't know, a locomotive is a train of sort. Summing up my answer, the steam engine helped us advance to eventually having better technology such as locomotives and soon trains.
Hope I helped! (: