A coilgun is a type of mass driver consisting of one or more coils used as electromagnets in the configuration of a linear motor that accelerate a ferromagnetic or conducting projectile to high velocity. In almost all coilgun configurations, the coils and the gun barrel are arranged on a common axis. A coilgun is not a rifle as the barrel is smoothbore.
A single stage coilgun
A multistage coilgun
A M934 mortar round is adapted for experimental coilgun launch with a conformal armature tail kit, to be fired through a barrel composed of short solenoidal electromagnets stacked end to end
A large coilgun concept, a coaxial electromagnetic launcher firing projectiles to orbit
A mass driver or electromagnetic catapult is a proposed method of non-rocket spacelaunch which would use a linear motor to accelerate and catapult payloads up to high speeds. Existing and proposed mass drivers use coils of wire energized by electricity to make electromagnets, though a rotary mass driver has also been proposed. Sequential firing of a row of electromagnets accelerates the payload along a path. After leaving the path, the payload continues to move due to momentum.
Artist's conception of a mass driver on the Moon