They use a large saw to cut grooves several inches deep in the pavement, in the shape they want, then they run wire through the cracks to form a coil. The ends of the coil lead back to the control box for the traffic lights. Once the wire is laid they fill the cracks with sealant.
If the wire goes bad they rip out the sealant, replace the wires, then re-seal. Not bad at all really.
The biggest problems with them are that a lot of them aren't well tuned and won't pick up smaller (magnetically!) vehicles (ie bikes, corvettes, etc), and poor placement. Here in the Chicago suburbs it's common for lanes to have multiple sensors so that the signal controller can tell approximately how many cars are waiting at each side of the intersection, and adjust accordingly. In theory. YMMV.
I always try to come to a stop with the centerline of the bike directly over one of the sensor lines, preferrably close to the left front corner of the sensor rectangle.
mystic_1