There were railways of a sort before the 19th century in Britain. Tracks made of stone and iron carried wagons from mines and quarries under horse power. The invention of the steam engine changed things dramatically.
Trevithick and Stephenson
In 1804 Richard Trevithick first harnessed a steam engine to a wagon. His engine was unsuccessful for transport, but the die was cast.
Just a few years later George Stephenson's Rocket became the first steam locomotive practical to use for pulling rolling stock (train cars to you and me). Stephenson applied the new technology to his Stockton and Darlington Railway in 1825, although in those early years horses still did some of the work.
The L & M
The first truly successful steam railway was the Liverpool and Manchester Railway (1830). The L&M sparked a feverish boom in railway building that lasted twenty years. By 1854 every town of any size in England was connected by rail, though Wales was less well served.
The gauge problem
One of the major problems of these early boom years was the lack of standardization (the same difficulty encountered by canal builders earlier). There were at least 5 different gauges (the distance between the rails) in use in the 1840s. This meant that trains made for one line could not use rails on another line, so goods would have to be unloaded and transferred to a new train of the proper gauge. This problem was not completely solved until the 1890s.
Rail was the most popular means of transport for goods and people throughout the Victorian era and well into the 20th century. In a sense, rail set the tone for 19th century "progress" and made possible the entrepreneurial successes and excesses of the Industrial Revolution.
What to see
Some prominent Victorian railway stations are still in use, notably Paddington (the building, not the bear of the same name), St. Pancras, and York. Many rail lines that fell into disuse in the 20th century are now resurrected and enthusiasts like my 4-year-old son can take rides on coaches pulled by steam locomotives. Major rail museums also exist at Didcot and York.