Tramways were originally blocks of wood or stone sunk into the ground in parallel lines so that wagons had a firm surface on which to run. Initially, they were used in or near mines. The use of rails came later, as did the public tram cars that we know today.