12th Standard Physics:
1) Two ends of the battery attached to two strong neodymium magents.
2) The copper coil forms a solenoid.
3) Once the two ends of the battery(through magnet) comes in contact with the copper wire , the current runs through the solenoid(only in the length of the battery) which causes a magnetic field to be setup inside the solenoid.
4) Magnetic field caused by Solenoid interacts with the magnetic field of those strong magnets in such a way that they repel and the direction of repulsion is such that it pushes them inside the coil.
5) As it traverses through the coil, it keeps on creating a current carrying solenoid in the region where the battery(through magnet) touches the copper wire and hence, a resultant push which causes the battery to move continuously.
PS:1) To make them move faster, its better to have a higher voltage battery with stronger neodymium magnets.
2) To create any motion you need a source of energy and in this case, it is the battery which delivers the energy for this motion to happen. So , after sometime the battery will be drained out !!!