Applied Science is a great YouTube channel where you learn about the practical concepts derived from science theories. He uses a ton of devices to explain the science behind things from around us.
In the video from above you can see the explanation of how anti-theft tags work. Their workings are based on a phenomenon called magnetostriction, the ability of a metal to change form when under a fluctuating magnetic field.
Basically, when you want tog get out of a shop and you have such a tab on your clothes you enter in the fluctuating magnetic field generated by the two beacons from the entrance. That field determines the metal from within the anti-theft tag to change form, to stretch and compress a bit, and thus those beacons can detect it.
The anti-theft tag has two small metal blades and a permanent magnet which connects the two. When the beacons generate the fluctuating magnetic field the metal blades oscillate at 56Hz and this is picked up by the beacons. Thief has been caught. If you use a coil you can demagnetize the tags and then you can use a permanent magnet to magnetize them again.