A railgun consists of two parallel rails, one conducting piece of ammunition, and some power source, like a capacitor. The rails are attached to some non-conducting base, with the ammunition (often a copper slug) placed between them such that it touched both. A wire (or metal rod, depending on the current you want) is attached to each rod, and when you are ready to fire, you touch the leads of the cap to the two wires (rods).

The railgun works by the force that is created when a current runs perpindicular to a magnetic field. The current in this case is between the rails, through the copper slug. The magnetic field is created by the current through the rails. The force is dependent upon the energy stored in the cap, so large caps and caps in parallel are a good idea here. The slug will attain extremely high velocities with this railgun, and it is possible to shoot paper clips through bricks with big enough caps.