MAGs, or Magnetic Accelerator Guns, are special devices that are used as an alternative to missiles. The MAGs can fire at a high rate of speed (so fast that it can blow a fighter jet out of the sky) and hit with what has been described as the power of a warhead.
A much weaker version can be built at home. It is enough to hurt, but not to maime or kill (I hope). I do want to say one thing, there are articles saying that the US navy made the first railgun. These are false reports. They have been around much longer.
Anyway....there are two common types, the railgun and the coilgun. The railgun utilizes rails and the coilgun makes use of coils. Both work on the effects of magnetism.
As current is passed through the coils in a controlled order, it pulls a cylindrical projectile through a tube. Each coil makes the projectile faster and more powerful. But, the size of the coils matters more than the number. One gigantic coil does better than three small coils.
As for the railgun, it is much simpler. As current is passed through the rails, with the projectile touching the sides, a magnetic force is spiraled and pulls the projectile forward. However, the railgun can only be fired once, since the friction of the projectile on the rails causes the rails to melt, and the projectile itself is usually reduced to a metal plasma.
As for how to make one, it is easy in theory, but still a bit difficult to make. For this lesson, I will tell how to make a 1-stage (1-coil) coilgun. Take a spool of 16 gauge magnet wire and start in one spot, winding the wire along a copper tube to a certain point, making sure to leave enough on both ends to be used. The point has no effect on learning. It is more of a power/personal choice. Make sure to keep it neat and not haphazard.
A capacitor bank is then needed. You need two or three large capacitors. Take caution handling them as if they were charged. Depending on the capacity, they can kill you. The best way to avoid this: don't charge them yet. Now, connect all of the capacitors in parallel, polarity doesn't matter for this type of MAG. Charge each capacitor individually, using a method of choice, preferably by a power supply, but not by a wall outlet. Once the capacitors are charged, put a metal projectile in the beginning of the tube, then stand to the side as you press the switch. You won't be able to see it, but if you have something like a box set up at the other end, you will hear the crack of the metal into the box.
If you wish to take up any project involving electricity, please take caution not to get yourself injured or killed.