A railway signal or just signal is a mechanical or electrical machine that gives train drivers or engineers information about the state of the line ahead. This way, they know whether the train must stop or may continue. It can also tell what speed the train may go.
In Britain, modern signalling uses a system similar to Traffic Lights. A red signal means 'do not go any further'. A green signal means 'you can continue'. A yellow signal means the next signal will be red. A double yellow signal means the next signal will be yellow, so the signal after that will be red.