The predecessor of the Gatling gun was a multi-barreled weapon called the Mitrailleuse gun, the first variant of which was invented by a Belgian captain named Fafschamps in 1851. A number of different variations of Mitrailleuse guns were invented by many people, but some of the features remain common to all of them. They all have multiple barrels which can be loaded simultaneously. Turning a crank fires these barrels. Then the breech of the weapon is opened and the magazine plate is taken out and a new magazine plate containing more rounds is loaded into the breech.
The above two pictures show a Mitrailleuse type gun and one of its magazines from the 1850s. Such guns were often heavy and came mounted on a carriage for easy transportation.
One of the problems of such guns was that it was difficult to aim at range and also, the shots were not as dispersed as they had hoped. Hence, this type of gun was a failure on the battlefield, but its multi-barrel design inspired the Gatling Gun.
Ironically, Dr. Richard Gatling, who invented his weapon in 1861, hoped that his weapon would show how futile war is and reduce combat deaths that way. His invention was used in the US Civil war and soon adopted by other countries.
It consists of multiple rotating barrels which are turned by a hand crank. The original Gatling gun was fed by a hopper containing loose cartridges. The idea of a multi-barrel weapon was not new at this point, as the Mitrailleuse guns showed, as well as the pepperbox revolvers of the era. However, one of the innovations of the Gatling was that, as one barrel is being fired, the other barrels are simultaneously in various stages of either unloading or loading a cartridge. This means, even if there are only (say) six barrels in the weapon, the user doesn't have to stop and reload after six shots are fired. The Gatling automatically loads new cartridges from the hopper, as the crank turns. This allowed even unskilled soldiers to maintain high rates of fire. Indeed, a four man crew could shoot up to 1200 rounds per minute using a weapon like this.
The Gatling gun originally used paper cartridges, but soon adopted the newer metallic centerfire cartridge technology. Each barrel of a gatling gun fires once per revolution, at the exact same position. Each barrel has its own grooved carrier and lock mechanism. Each barrel also has a cam that forces the lock to move in a back and forth reciprocating motion. When the crank is turned, cartridges from a gravity-fed hopper drop into the grooved carriers. The lock is forced forward by the cam and loads the cartridge. At the highest point of the cam, the lock releases and fires the cartridge. Then the cam keeps turning and opens the lock to eject the spent cartridge to the ground.
The Union army of the United States was the first to adopt the Gatling Gun into service. Its effectiveness was actually demonstrated by a salesman in a live combat situation! Soon afterwards, it was adopted by many other countries as well.
The Gatling gun mainly fell out of favor because of its weight and because it had to be transported on a carriage. However, in the 1950s, the concept of a multi-barrel firing weapon made a comeback and the Gatling style design is still being used by combat aircraft such as the A-10 Warthog, to this present day. In its modern descendants, the barrels are turned by the action of an electric motor rather than a hand crank.
The advantage of a Gatling-style gun is that since multiple barrels are used, it can be used for continuous and high rates of fire. For instance, if a gun has 10 rotating barrels, it can safely be fired at a rate of say 1000 rounds per minute., since each barrel only fires 100 rounds per minute individually. This allows each barrel to sufficiently cool before loading a new round. By contrast, a single barrel weapon would start to overheat at these firing rates and its barrel could jam or distort due to the heat.