The first true submachine guns saw combat in World War I, where they proved an asset in trench warfare. During the Prohibition era in the United States, the Thompson submachine gun grew infamous
for its heavy use by gangsters and police officers, and was later used by U.S. soldiers in WWII. Submachine guns were used by all sides in WWII to provide soldiers (who were typically armed with bolt-action rifles) with superior close range firepower, and continued to see service afterwards, but were soon usurped as standard military weapons by automatic rifles. In recent years, submachine guns have mainly been used by law enforcement officers, counter-terrorism operatives and special forces soldiers, but they have begun to fall out of favour with these groups due to their poor effectiveness against modern body armor.
Sub-machine guns occupy the middle ground between pistols and rifles in terms of effectiveness. They'relighter and shorter than rifle carbines, making them easy to manuever in close quarters, and have somewhat softer recoil. On the other hand, they're less accurate at range than most rifles and have inferior stopping power. Despite this, sub-machine guns (and their semi-automatic equivalents) are far more practical than machine pistols (due to their more ergonomic layout) and they will suffice for a primary weapon if you should come across one, though a rifle is preferable. If you do choose to use a sub-machine gun, it is important to keep it on semi-auto mode, as fully automatic fire is only a waste of ammo against zombies. The temptation to go full auto may be an argument against the use of these weapons by some people. Well known submachine gun designs include the Thompson submachine gun, the IMI Uzi, the MP-40 and the H&K MP5.
Personal defense weapons (PDWs) are a relatively recent development in submachine gun designs. They are submachine guns that fire newly developed cartridges which are essentially scaled down rifle cartridges designed to have superior penetration to the pistol calibers traditionally used in submachine guns. The most well known design in this category is the FN P90.