Trains changed America in many important ways. Let us look at the two most important ways in which they did this.
First, they changed the United States by making it more of a continental country. Before trains, it was very difficult to travel and to trade between the more settled parts of the US and the west. This meant that large parts of the country were sparsely inhabited by Americans. Trains changed this. They brought farmers out to the Great Plains and beyond. They allowed those areas to have constant contact with the East. This meant that Americans soon came to occupy all parts of the country.
Second, they changed the US economy. They helped to make the economy more industrial. They did this because they needed huge amounts of steel for railroad cars and tracks. They also did it because they made it easy to transport raw materials from place to place. This allowed factories to get the raw materials they needed and to ship the finished goods all over the country.
In these ways, the railroads had a huge impact on the United States.