How Traffic Lights Work?

Some traffic lights are controlled by a timer that indicates how long each light should stay green, yellow or read, sometimes changing depending on the time of day. Others use sensors in the road to determine if there is any traffic waiting in a particular direction.