@Rambo: The magnetic field is generated following the cork rule (if I remember from years ago in Physics) you'll figure it out if you read PpowerLabs' articles on them:
http://www.powerlabs.org/railgun.htm
@Benny: If the foil vaporises, the magnetic field will have nothing to pull. Plus, this is a KE (kinetic energy) gun. Energy=mass*speed. How much mass do you think a molecule of aluminium has? Hint: by far not enough to be used as a projectile unless it has speeds aproaching that of light.
As a side-note: Particles (albeit heavier than Al) have been accelerated to energies equal to a bullet. Yet these particle accelerators are as big as a city block and use just as much power. What I'm trying to show you is that a plasma gun like the one Benny is talking about would be REALLY, but I mean REALLY impractical. Railguns shoot solid proijectiles, period.