A cab signal is a signal unit mounted in the locomotive cab which shows the aspect of the next signal down the line. These can allow the engineer to see the next signal before he gets to that point. They can also be used to add signals to the line without erecting signal masts. Some shortlines even use them just so that they don't have to erect and maintain wayside signals. Some cab signals will also show the current speed limit for that section of track (changing with restrictions). The FRA requires cab signals to be used on any train where the normal operating speed can exceed 79mph.
I'm sure someone else can provide a more detailed explanation.
Trains aren't dangerous, it's lack of common sense that's dangerous.