The version I built was far simpler, and used electromagnets instead of the magnets, but you can see the general idea.
I didn't design it, I don't know where the Den Mothers got the design from. But I found it fascinating, as you could see and feel how it worked.
I built several of them. One day, I got a little bolder and replaced the battery with an A/C cord. The motor buzzed loudly and burst into flames. I learned about alternating current that day :-)