SMGs, short for SubMachine Guns, are miniaturized assault rifles, modified to fire pistol cartridges. This makes them be very concealable, but they deal low damage and lose power at range. They make up fore this lack of power with a higher than average fire rate, and they are very well capable of holding their own in a close ranged gunfight. Only shotguns and melee weapons can challenge them at close-range.
They fill a secondary weapon role, what they lack in accuracy or power they make up for in fire rate and magazine capacity. They act as a second primary of sorts, instead of the "back-up" or "finish him off" role of pistols. Keep in mind that pistols have greater accuracy and often have greater damage, but they lack automatic fire and their magazines are very small.
smgs are nearly always found in all of the james bond movies