To make a simple electric train we will need about 50 meters of uninsulated copper wire to make a coil, a couple of neodymium magnets, a battery (we can use an AA battery), and a foam or brass washer. We need the latter to surround the “bump” on the plus side of the battery, to level the surface and to keep the magnet from sliding away. We have to make sure that the diameter of the coil is wide enough to allow the magnets and the battery to slide through. A little graphite will act as conductive lubrication. We attach a magnet to the minus side of the battery and the other magnet to the plus side. Do not forget to add your foam or brass washer to the plus side before you add the magnets. We then position our train just inside the coil, and it will move in and through the coil on its own, because the system becomes an electromagnet. This is how our setup works. The train is a kind of a homopolar motor. The neodymium magnets act as the contacts of the battery, by connecting it to the uninsulated coil, which is wound around a tube or rod. The electric current that flows through the coil generates an electric field. This field interacts with the magnetic fields of the neodymium magnets and generates magnetomotive force that pushes one magnet and pulls the other one.
Note: when building this setup, we have to be careful about using the correct winding side of the coil (left-wound or right wound coil), and the correct polarity of the magnet setup of our train. The south S pole of the front magnet connects to the plus side of the battery, while the north N pole of the second magnet is connected to the negative pole. If your setup is different, then you can simply flip the magnets over. In more simple terms, you can take a pair of magnets, make sure that they are pushing each other apart and then stick them to the battery. If it goes through the coil, you are done, if not — simply reverse it and it will go. If not, then you will have to reverse one of the magnets.