Network Rail sells access to the network to train operating companies, which are private (though often state-owned by other countries).
The network was originally built by private companies until nationalisation in 1947 (railway companies were bankrupt after WW2). It was private for a while in the 90s, then went bankrupt and renationalised in 2002. Seems to be quite the money pit!