How do the signals along the track work? Are they like traffic lights?
Railroad signals are similar to traffic signals in regards to green means go, yellow slow down and be prepared to stop, and red means stop. Railroad signals also add a fourth aspect - flashing yellow. Aspects for traffic signals (green, yellow, red) are all in the same place at an intersection.
Railroad signals are typically 6 miles in advance, i.e., there is an occupancy out in front of a train, you have a green at Mile Post 0, a flashing yellow at Mile Post 2, a yellow at Mile Post 4, and a red at Mile Post 6. Railroad signals not only give speed instructions to the engineer but also separate trains on the track by time and distance. That time and distance is important because it takes a lot of distance to stop a train. ~ Scott Reif, Manager of Signals