I loved these things. Never understood how they worked (still don’t) but I didn’t care!
Electromagnets and a touch of devil-math from the STEM layer of hell, as is with most technology.