Today I learned how traffic light sensors work: induction loops.
Basically, they cut electric wires into the pavement, and when a car drives over those wires it sends a signal to the traffic light.
If you really want to learn how this works, you can read the Federal Highway Administration’s Traffic Detector Handbook.
Of course, there’s a lot of other types of traffic controllers now (lidar sensors are wild), but if you spot those familiar cuts in the road, you know there’s an induction loop sensor.