Before the development of railroads in the 19th century, infantry armies got to the battlefield by walking, or sometimes by ship.
During the 19th century, advances in firearms technology rendered the use of close formations obsolete.