How is it safe to run trains in both directions on a single line?
The signalling system we use is designed to prevent more than one train being on the “single line” at a time. The train driver must have a staff or token before entering the section of line, and the machine that issues these in the signal box at one end of the line is linked to the machine at the next signal box, and also with the signals, and so “blocks” the line to any other train. There is more detailed information available here.