There are various types of trains that are designed for particular purposes. A train may consist of a combination of one or more locomotives and attached railroad cars, or a self-propelled multiple unit (or occasionally a single or articulated powered coach, called a railcar). The first trains were rope-hauled, gravity powered or pulled by horses. From the early 19th century almost all were powered by steam locomotives. From the 1910s onwards the steam locomotives began to be replaced by less labor-intensive and cleaner (but more complex and expensive) diesel locomotives and electric locomotives, while at about the same time self-propelled multiple unit vehicles of either power system became much more common in passenger service.
A passenger train is one which includes passenger-carrying vehicles which can often be very long and fast. One notable and growing long-distance train category is high-speed rail. In order to achieve much faster operation over 500 km/h (310 mph), innovative Maglev technology has been researched for years. In most countries, such as the United Kingdom, the distinction between a tramway and a railway is precise and defined in law. The term light rail is sometimes used for a modern tram system, but it may also mean an intermediate form between a tram and a train, similar to a heavy rail rapid transit system except that it may have level crossings.
A freight train (also known as a goods train) uses freight cars (also known as wagons or trucks) to transport goods or materials (cargo). Freight and passengers may be carried in the same train in a mixed consist.
Rail cars and machinery used for maintenance and repair of tracks, etc., are termed maintenance of way equipment; these may be assembled into maintenance of way trains. Similarly, dedicated trains may be used to provide support services to stations along a train line, such as garbage or revenue collection.