system
Given the following post, respond as if you're commenting on Reddit:
human
City Planners: Can someone explain exactly how traffic lights interact with traffic and each other?

Between pressure sensors, light sensors, one light turning green with the next one immediately turning red, I'm very lost.  How do these things respond to differing traffic situations and how widespread is the technology?
gpt
At almost every intersection there is a small box located near one of the corners. This controls the traffic lights. 

It has both manual controls, for workers, and the automated timing ones. (I have a friend who works electrical, and spends time inside them. You can even make both directions display green simultaneously.)

For many intersections, there is a dominant street that contains higher traffic. This light is set to be green constantly, unless another car is detected at the cross street. 

Most light systems use an embedded ring of wire in the ground to detect vehicles. When you drive over one, it let's that box know a car is there, changing the lights. 

Same thing happens for left hand turn lanes. Sometimes there's is one ring, or two. When both rings are occupied, it will engage the left hand filter for the next green. Or, not at all if no car is there. 

There are even some lights that will keep an entire direction red if no cars are detected, just to prevent people from speeding up to a short changing green light. 

It all depends on the traffic calming patterns and situation for the particular light location. Most are designed to work with special lighting characteristics found through traffic simulations. 

There is also data about traffic numbers and times collected by those two black ropes laid across the street. All of these factors go into programming the lights to calm traffic.