Steam locomotives played a huge role in the development of the US (and the world) from the mid 1800s to when they were replaced by diesel locomotives in the latter half of the 1900s. Here is a film of the old steam locomotives in action.
Note that the massive upper front part of the locomotive all boiler. Heat from the fire box just in front of the cab passes through pipes in the boiler to the stack, generating high temperature/pressure steam. The steam pressure drives a piston which drives the wheels as shown in this video. http://www.animatedengines.com/locomotive.html