1. 'Railway' (BrE) and 'railroad' (AmE) usually refers to the actual infrastructure of tracks, signals, rolling stock and so on. 'Rail' originally meant just the metal bars themselves. Now it is used to cover not only the meaning of 'railway' above but also the whole concept of this type of transportation.
It's also worth remembering that 'railway' is countable and refers to a physical system ( e.g. "We travelled on a little mountain railway") , while 'rail' is uncountable and refers in a more general way to the means of travelling or moving freight.
2. We often use 'the railway' to refer to the system in historical contexts e.g. "The arrival of the railway in the 1870s changed the culture of the region." AmE would use 'railroad' in the same way.
But when we're talking about the modern world, the word 'railway' is beginning to sound old-fashioned. While 'railway' is still used for some compounds to do with physical aspects of the rail network ( eg a railway bridge or railway tunnel), it's gradually falling out of use in other contexts, especially among the younger generation. For example, most younger people would say 'train station' rather than 'railway station' (BrE). In everyday contexts, we'd talk about travelling 'by train'; we might say 'by rail' in more formal contexts or when talking about transporting goods, but we wouldn't say 'by railway' - this would sound very odd and outdated. BrE speakers would also probably say 'There's a fast rail link between the two cities' than 'There's a fast railway link between the two cities'.