A firearm is any type of gun that shoots projectiles using high explosive pressure generated from combustion (deflagration) of chemical propellant, most often black powder in antique firearms and smokeless powder in modern firearms. Small arms is a subset of light firearms that is designed to be readily carried and operated by an individual. The term "firearm" is however variably defined in both technically and legally in different countries (see legal definitions), and can be used colloquially (sometimes incorrectly) to refer to any type of guns.
The first firearms originated in 10th-century Song dynasty China (see gunpowder weapons in the Song dynasty), when bamboo tubes containing gunpowder and pellet projectiles were mounted on spears to make the portable fire lance, which was operable by a single person and was later used effectively as a shock weapon in the siege of De'an in 1132. In the 13th century, fire lance barrels were replaced with metal tubes and transformed into the metal-barreled hand cannon, and the technology gradually spread throughout Eurasia during the 14th century. Older firearms typically used black powder as a propellant, but modern firearms use smokeless powder or other explosive propellants. Most modern firearms (with the notable exception of smoothbore shotguns) have rifled barrels to impart a stabilizing spin to the bullet for improved external ballistics.