Well, no. The Underground Railroad your'e asking about wasn't an actual railroad, but a secret network of people who wanted to abolish slavery. Between 1840 and 1860 slaves from the southern United States used this secret network of dangerous routes to reach freedom in Canada.
The term "Underground Railroad" started to be used in the 1830s, although it was not an actual railway - the railroad terminology and symbols were used to hide the activities of the network. Words such as "passengers", "cargo", "package", and "freight" were used to refer to the escaped slaves. Secretive groups of people, some who ran "safe houses", were called "station masters", and received escapees into their homes and provided food, clothing and a place to hide. These people committed themselves to human rights and equality.
Many walked, but others were transported in wagons, carriages and horses. Escapees also travelled by boat across lakes and rivers. They often travelled by night and rested during the day.
And now you know.