A Real Railgun
I was working on a physics problem that involved the physics of a railgun, so I decided to look up on the internet to see if anyone has build one before. As it turns out, the US Navy build a huge railgun and decided to release a video of the testing. You can see it above. The speed at which the projectile fires is quite impressive, just look at the end of the video for the hole that the projectile leaves in the steel target.
In summary how railguns work (I’m assuming that you know the basics of electromagnetism and especially the right hand rule) is that the metal projectile is situated on two rails that are connected to the battery. This then causes current to flow through the rails and the projectile. As you probably know, a current generates a magnetic field; in this case the two rails generate a field in between them pointing into the page. Also you should know that a current in the magnetic field feels a force; in this case the projectile will feel a force to the left and shoot it.