Some had wheels that turned, but these needed to be pushed or pulled. Some of the early 19th-century drive toy rails were made from tinplate, such as the large, durable, stylized locomotive toys in the U.S., which were painted gold and red and decorated with hearts and flowers. xkcd model trains
Around 1875, technological improvements in materials and manufacturing allowed tin to be stamped, cut, wrapped, and lithographed faster than ever before.
Toy trains were revolutionized when Märklin, a German company which specialized in doll house accessories, sought to create an equivalent toy for boys where a constant revenue stream could be ensured by purchasing add-on accessories for decades after the first purchase. In addition to boxed sets comprising a train and track, Märklin offered extra track, rolling stock, and buildings offered separately, creating the predecessor to the modern model train layout featuring scenery and buildings along with a working train.
Electric trains followed, with the first appearing in 1897, produced by the U.S. firm Carlisle & Finch. As home use of electricity became more common in the early 20th century, electrical trains gained popularity and as time went on, these electrical trains grew in sophistication, gaining lighting, the ability to change management, to emit a whistling sound, to smoke, to couple and uncouple cars as well as load and unload cargo. Toy trains from the first half of the 20th century were often made of lithographed tin; later trains were often made mainly of plastic.
Prior to the 1950s, there was little differentiation between toy trains and model railroads–model railroads were toys by definition. Pull toys and wind-up trains were marketed towards children, while electrical trains were marketed towards teenagers, particularly teenaged boys.
Today, S gauge and O gauge railroads are still considered toy trains by their own adherents and are often accessorized with semi-scale model buildings by Plasticville or even K-Line (who owns the rights to the Plasticville-like buildings produced by Marx in the 1950s to the 1970s). However, as a result of their high cost, one is more inclined to locate an HO scale or N scale train set in a toy store than an O scale collection.
Many modern electrical toy trains contain sophisticated electronics that emit digitized sound effects and permit the operator to securely and easily run multiple remote control trains on one loop of course. In the last few decades, many toy train operators will operate a train with a TV camera at the front of the engine and hooked up to a screen, such as computer monitor. This will show an image, like that of a real (smaller size) railroad)
Thanks for your interest in xkcd model trains