How it works:
Current from the battery enters the aluminum foil and goes into the paper clips and into the copper wire, creating an magnetic field. It then becomes attracted and repulsed (making it move) by the magnet on top of the cup as one side of the wire becomes positively charged and the other becomes negative. An electric field can create a magnetic field. The magnetic field is created around the copper wire and it interacts with the magnet. This is due to Ampère’s circuital law. The field density should be equal to the current times the permeability of the wire. Electrons create a magnetic field when the are in motion. This is why the wire has a field around it as the electrons are traveling through it.