Unsurprisingly, given the size of Namibia, the generally excellent road network, and the fact that most of the places of interest are a fair distance from what is left of the passenger network, there is currently only a very limited standard service provider (although occasionally luxury trains, most notably the desert express, will run some routes).  

The first railways (in the then German South-West Africa) opened in 1895 from Cape Cross to Swakopmund and was constructed for the transport of guano. The first two public railways opened in 1899 from Swakopmund. One, built by the British Government, ran to the British enclave of Walvis Bay. The other ran to Karibib, and was the first section of a line to 

Windhoek. Whilst originally opened by, and used by, the military, civilian use began almost immediately. With the Herero revolt in 1904 - which was to lead to a genocidal response by the imperial power - the only available alternative was to import European labour, initially an Italian team who eventually began to work with Owambo labourers. The southern line from Lüderitz to Keetmanshoop began in 1905; in 1912 the line between Windhoek and Keetmanshoop was completed. 

Namibian Railways serves most major population centres in the country. The international connection with South Africa, used by freight, luxury cruise trains and by StarLine passenger services as far as Upington, 150km inside South African territory (a slightly pointless destination as there are currently no regular onward passenger rail connections at Upington - the nearest Spoornet station is about 400km away). 

But to find out a huge amount of information about railways in Namibia, from the past to the present day - and to see where many of my Namibian railway images are from (let alone the huge variety of ephemera I managed to get) - go to the Transnamib railway museum - more information here.