There is something exotic about the traffic lights that "know" you are there -- the instant you pull up, they change! How do they detect your presence?
Some lights don't have any sort of detectors. For example, in a large city, the traffic lights may simply operate on timers -- no matter what time of day it is, there is going to be a lot of traffic. In the suburbs and on country roads, however, detectors are common. They may detect when a car arrives at an intersection, when too many cars are stacked up at an intersection (to control the length of the light), or when cars have entered a turn lane (in order to activate the arrow light).
There are all sorts of technologies for detecting cars -- everything from lasers to rubber hoses filled with air! By far the most common technique is the inductive loop. An inductive loop is simply a coil of wire embedded in the road's surface. To install the loop, they lay the asphalt and then come back and cut a groove in the asphalt with a saw. The wire is placed in the groove and sealed with a rubbery compound. You can often see these big rectangular loops cut in the pavement because the compound is obvious.
Inductive loops work by detecting a change of inductance. To understand the process, let's first look at what inductance is. The illustration on this page is helpful.
What you see here is a battery, a light bulb, a coil of wire around a piece of iron (yellow), and a switch. The coil of wire is an inductor. If you have read How Electromagnets Work, you will also recognize that the inductor is an electromagnet.
If you were to take the inductor out of this circuit, then what you have is a normal flashlight. You close the switch and the bulb lights up. With the inductor in the circuit as shown, the behavior is completely different. The light bulb is a resistor (the resistance creates heat to make the filament in the bulb glow). The wire in the coil has much lower resistance (it's just wire), so what you would expect when you turn on the switch is for the bulb to glow very dimly. Most of the current should follow the low-resistance path through the loop. What happens instead is that when you close the switch, the bulb burns brightly and then gets dimmer. When you open the switch, the bulb burns very brightly and then quickly goes out.
The reason for this strange behavior is the inductor. When current first starts flowing in the coil, the coil wants to build up a magnetic field. While the field is building, the coil inhibits the flow of current. Once the field is built, then current can flow normally through the wire. When the switch gets opened, the magnetic field around the coil keeps current flowing in the coil until the field collapses. This current keeps the bulb lit for a period of time even though the switch is open.
The capacity of an inductor is controlled by two factors:
The number of coils
The material that the coils are wrapped around (the core)
Putting iron in the core of an inductor gives it much more inductance than air or any other non-magnetic core would. There are devices that can measure the inductance of a coil, and the standard unit of measure is the henry.
So... Let's say you take a coil of wire perhaps 5 feet in diameter, containing five or six loops of wire. You cut some grooves in a road and place the coil in the grooves. You attach an inductance meter to the coil and see what the inductance of the coil is. Now you park a car over the coil and check the inductance again. The inductance will be much larger because of the large steel object positioned in the loop's magnetic field. The car parked over the coil is acting like the core of the inductor, and its presence changes the inductance of the coil.
A traffic light sensor uses the loop in that same way. It constantly tests the inductance of the loop in the road, and when the inductance rises, it knows there is a car waiting!