Machine pistol

A machine pistol is a typically a -style firearm that can fire fully automatic or burst fire. Fully automatic means that the gun will continue to fire very rapidly so long as the trigger is pressed and held. Burst fire means that when you pull the trigger, a number of shots determined by the shooter will be fired (for some guns, this is three shots, fired very quickly). Machine pistols fire pistol cartridges. Machine pistols usually have the cartridges fed into the gun with a magazine, which is a rectangular box which holds the cartridges.
Machine pistols are usually self-loading, which means that the gun automatically loads a new cartridge into the chamber after a shot is fired. 
History.
The first true machine pistol was the German MP-18 introduced in 1918. It fired the 9mm Parabellum cartridge. It used a side-loading magazine that held 20 cartridges. 
The Germans converted some pistols, like the Luger, into machine pistols. They invented a type of Luger called the Luger P08 in World War I to German artillery crews. It had a longer barrel and a 32 round magazine shaped like a round drum. It was given to artillery crews so they could defend themselves.
In 1951 the Russian army developed the Stechkin APS, which could fire in burst fire or in fully automatic fire. When the gun was used in burst or automatic fire, users were told to use the wooden stock so that they can control the weapon better. One of the problems with machine pistols is they tend to rise up when being fired, making the bullets miss their target.
1990s2000s.
In the 1990s and 2000s, as more soldiers began wearing bulletproof vests with hard ceramic armor, the machine pistol became less useful in a military setting. The low-powered pistol ammunition was not able to penetrate ceramic-plated Kevlar military vests. As a result, armies began to issue a new gun, the personal defense weapon or PDW. The PDW fires armor-piercing, higher-powered ammunition which can go through bulletproof vests.