A machine gun is a small-calibre "fully automatic" projectile weapon that is capable of firing bullets in rapid succession. Generally any "machine gun" with a calibre of more than 12.5mm (0.5 inch) is called an automatic cannon, even through it might operate the same way.
The machine gun's primary role in a ground-combat situation is to provide suppressing fire on an opposing force's position. This forces the enemy to take cover. This either halts an opposing offensive, or allows allied forces to move onto the field with less danger.
To this end, most light machine guns are not designed for repeatability of aim or accuracy. Most are designed with a small degree of inaccuracy, in order to lay down a field of fire. This is referred to as the "cone" of fire, because the rounds spread out. Light machine guns usually have simple iron sights. Laser sights are used by police and anti-terrorist services. An Israeli intuitive aiming system is to alternate solid and tracer rounds, so the shooter can walk the fire into the target, and direct other soldiers' fire.
Many heavy machine guns, such as the M2 0.50Cal machine guns are so accurate that they can actually be used to snipe targets at great distances. Some models have been equipped with aim points that can be preset.
All machine guns follow a cycle. Mechanically, this cycle removes the used round casing, and cocks the hammer. Another round slides into position. Spring tension or a cam then forces the new round and bolt back into the firing chamber. A mechanism makes the firing pin fire the primer. The cycle repeats. This entire cycle takes a fraction of a second.
Machine guns operate by several methods:
Not all machine guns strike the primer in the same way. In blowback machine guns, the act of seating the round also fires the round. In gas operated and recoil-operated guns, a separate step in the firing sequence is needed to strike the round. In progressive-fire guns, the firing pin is cycled by cams.
In weapons where the round seats and fires at the same time, mechanical timing is essential for operator safety, to prevent the round from firing before it is seated properly. This is especially important in weapons like the 40mm grenade launcher, where high explosives are present in the rounds being fired.
Machine guns are controlled by one or more mechanical sears. When a sear is in place, it effectively stops the bolt at some point in its range of motion. Some sears stop the bolt when it is locked to the rear. Other sears stop the firing pin from going forward after the round is locked into the chamber.
Almost all weapons have a "safety" sear, which simply keeps the trigger from engaging.
Typically, the act of pulling the trigger causes something to strike the primer on the round in the chamber, and disengages the sears. This allows continual cycling of the bolt until the trigger is released. A sear then grabs the bolt or firing pin. This stops the machine gun at some point in its cycle.
History
James Puckle, a London lawyer, patented what he called "The Puckle Gun", a rifle capable of shooting 9 rounds before reloading, on May 15, 1718. Some consider this the first ancestor of the machine gun.
Guiseppe Fieshci used a "machine gun" in an attempt to assassinate King Louis Philippe of France in 1838.
The Gatling Gun was patented in 1861.
See World War I, squad automatic weapon, assault rifle, weapon, general-purpose machine gun