A railway company or railroad company is an entity that operates a railroad track or trains. Such a company can either be private or public. Some railway companies operate both the trains and the track, while particularly in European Union ownership of track and train operation is separated in different companies.
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.
In Europe, the EU requires its members to split the railway companies into a number of different companies. Usually public owned companies own the track and other public companies (sometimes owned by regional governments) own the train cars. Public service obligations or franchising is 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.