Many of the equations and concepts  that govern how certain aspects of a rail gun work are complicated and can be confusing, so I will just give you a very generalized
idea of how a rail gun works.  The way a rail gun works is that it sends a large current down one of two parrallel copper rails.  The current is then either counducted through the armature or through a conducting fuse. The current running parrallel between the rail creates a magnetic field between the rails.  If you are looking at the rail gun from
a top view, the magnetic field is directed into the page, and the current is directed down one rail and then between or perpendicular to the rails through the conductor.   The magnetic field (B) then exerts an electromagnetic force down the rails due to the current (i) running between the rails.  This force can be visualized as equal to the cross
product between the current  and the magnetic field vectors.

F = i x B      (see diagram A)
 
 
 

(The equation at the bottom of Diagram A
has all of its variables in vector form)













In diagram A the blue arrow represnts the resultant force direction vector, the red arrows represent the current direction vector and the green arrow represents the
magnetic field direction vector.  As you can see the magnetic field that occurs due to the current between the rails is directed between the rails, into the page
and normal or perpendicular to the direction of the current.  And the resultant force is directed down the rails and normal to the current as well normal to the direction of
the magnetic field.  If you use the right hand rule you can see that the cross product between the the current (i) and the magnetic field (B) is indeed directed downward along the rails.

Producing a magnetic field and thus a force large enough to accelerate the projectile to the desired speeds, which in theory are only limited
by the speed of light , requires an enormous amount of current. However, this current does not have to be maintained for very long. What is needed is a sharp pulse of a
large amount of current. One that is equal to anywhere from 1 to 3 MA. To get an idea of how large a current this is, all it takes to kill the human body is a current of about
.15 Amps or higher.  On average, a rail gun will draw 1,000,000 Amps. Thats an order of 7 magnitudes larger!! This should impress you. To accomplish this task most
rail guns uses either  capcitors, inductors, or a compulsator.  A compulsators (compensated pulse alternator) allows for a huge amounts of current to be drawn repeatedly,
which means you can fire the rail gun more than once.  Compulsators have been in development since the mid 80's.  Currently at CEM their most powerful compulsator
has a peakoutput rating of 6kV, 3MA, 230MJ of stored energy, and 9 shot repetitive firing capability. (It is pictured first on the left below)
 
 
 
 

Here are a some pictures
of various compulsators:

 
 

To learn more about compulsators or rail guns visit CEM's site :  CEM's rail gun page