Rolling stock in a rail transport system generally encounters lower frictional resistance than road vehicles, so passenger and freight cars (carriages and wagons) can be coupled into longer trains. The operation is carried out by a railway company, providing transport between train stations or freight customer facilities. Power is provided by locomotives which either draw electric power from a railway electrification system or produce their own power, usually by diesel engines. Most tracks are accompanied by a signalling system. Railways are a safe land transport system when compared to other forms of transport. Railway transport is capable of high levels of passenger and cargo utilization and energy efficiency, but is often less flexible and more capital-intensive than road transport, when lower traffic levels are considered.
The oldest known, man/animal-hauled railways date back to the 6th century BC in Corinth, Greece. Rail transport then commenced in mid 16th century in Germany in form of horse-powered funiculars and wagonways. Modern rail transport commenced with the British development of the steam locomotives in the early 19th century. Thus the railway system in Great Britain is the oldest in the world. Built by George Stephenson and his son Robert's company Robert Stephenson and Company, the Locomotion No. 1 is the first steam locomotive to carry passengers on a public rail line, the Stockton and Darlington Railway in 1825. George also built the first public inter-city railway line in the world to use only the steam locomotives all the time, the Liverpool and Manchester Railway which opened in 1830. With steam engines, one could construct mainline railways, which were a key component of the Industrial Revolution. Also, railways reduced the costs of shipping, and allowed for fewer lost goods, compared with water transport, which faced occasional sinking of ships. The change from canals to railways allowed for "national markets" in which prices varied very little from city to city. The spread of the railway network and the use of railway timetables, led to the standardisation of time (railway time) in Britain based on Greenwich Mean Time. Prior to this, major towns and cities varied their local time relative to GMT. The invention and development of the railway in the United Kingdom was one of the most important technological inventions of the 19th century. The world's first underground railway, the Metropolitan Railway (part of the London Underground), opened in 1863.
In the 1880s, electrified trains were introduced, leading to electrification of tramways and rapid transit systems. Starting during the 1940s, the non-electrified railways in most countries had their steam locomotives replaced by diesel-electric locomotives, with the process being almost complete by the 2000s. During the 1960s, electrified high-speed railway systems were introduced in Japan and later in some other countries. Many countries are in process of replacing diesel locomotives with electric locomotives, mainly due to environmental concerns, a notable example being Switzerland, which has completely electrified its network. Other forms of guided ground transport outside the traditional railway definitions, such as monorail or maglev, have been tried but have seen limited use.
Following decline after World War II due to competition from cars, rail transport has had a revival in recent decades due to road congestion and rising fuel prices, as well as governments investing in rail as a means of reducing CO2 emissions in the context of concerns about global warming.
The history of rail transport began in the 6th century BC in Ancient Greece. It can be divided up into several discrete periods defined by the principal means of track material and motive power used.