The electromagnetic physics (science) of the loop detectors is that they are not affected significantly by small magnets. They are affected by large metallic structures that conduct electricity. The coils induce currents in the vehicles overhead, and the system senses the resulting change in impedance. Large conductive rings work very well.
In simple terms, magnets don't work, but wheels placed as close to the perimeter of the coils (as others have posted) maximize the likelihood of triggering the sensor.
There are many people who will tell you magnets work and that magnets around the gas line will improve mileage, etc. Aside from placebo effect, neither theory nor objective experiments show any benefit of either.