In simple DC and universal motors, the rotor spins inside the stator. The rotor is a coil connected to the electric power supply and the stator is a permanent magnet or electromagnet. Large AC motors (used in things like factory machines) work in a slightly different way: they pass alternating current through opposing pairs of magnets to create a rotating magnetic field, which "induces" (creates) a magnetic field in the motor rotor, causing it to spin around. You can read more about this in our article on AC induction motors. If you take one of these induction motors and "unwrap" it, so the stator is effectively laid out into a long continuous track, the rotor can roll along it in a straight line. This ingenious design is known as a linear motor, and you will find it in such things as factory machines and floating "maglev" (magnetic levitation) railroads.
If you place the wire near a permanent magnet, this temporary magnetic field interacts with the permanent magnet field. You will know that two magnets placed near one another either attract or repel. In the same way, the temporary magnetism around the wire attracts or repels the permanent magnetism from the magnet, and that is what causes the wire to jump.
You should be able to isolate into two groups any leads which have continuity with one another. The starting circuit is likely to isolate to two leads, the running circuit may have two or more leads that show continuity. If the running circuit has more than two leads, you will need to determine how those leads are to be used for voltage or speed changes.
As you might suspect, when you reverse the current in an alternating current motor, it takes time for those atoms to get going in the opposite direction. And the amount of time is not necessarily the same as the time it took to get the herd moving properly in the first place.