A railway company is a company within the rail industry. It can be a manufacturing firm or an operator. Some railway companies operate both the trains and the track, while, particularly in the European Union, operation of the track is undertaken by infrastructure operators and trains are run by different companies. Railway companies can be private or public.
Many countries have a national railway company that owns all track and operates all trains in the country, for instance the Russian Railways (the world's largest rail company by network size). Other countries have many different, sometimes competing, railway companies that operate each their own lines, particularly in the United States and Canada. Countries may have both public and private railway companies, for instance the United States, where the publicly-owned Amtrak exists alongside numerous private operators.
In Europe, the EU requires its members to split the railway companies into a number of different companies. In many cases, one or more public owned companies own the track and many other public and private companies (sometimes owned by regional governments) own the rolling stock and operate service. Public service obligations or franchising are then used to determine the right to operate the line for a limited time period, with multiple private companies bidding for the privilege to operate. Other companies offer trackside and rolling stock maintenance.