There is only one train line in Mauritania, linking Nouadhibou, Choum and Zouerat, but it's a tourist attraction itself. The train is said to be the longest one in the world, having over 150 cars and being over 2 kilometers long. It's used to carry iron ore from the Zouerat mine to Nouadhibou harbour.
The train departs daily from Nouadhibou at around 3pm and arrives in Choum for Atar at around 2am the next morning. Check departure times on arrival.
In Mauritania there is only one passenger car, but travel in iron ore hopper is also possible and advisable, as the passenger car is usually overcrowded and tickets are required. There is also first-class acommodation - first-class seats are limited, but they allow access to a smaller room with bunk beds. It does not necessarily ensure more comfort, though. Ticket price is 1500 ougiyas for second class in the passenger car and travel in hopper is free. Remember to have a scarf to cover your face, as there is a lot of dust.
From Choum it's possible to get to Atar with a bush taxi. The journey could take up to eight hours if the vehicle has a breakdown.