A gun is a ranged weapon designed to pneumatically launch typically solid projectiles, but can also project pressurized liquid (as in water guns/cannons, spray guns for painting or pressure washing, projected water disruptors, and technically also flamethrowers) or even charged particles (as in a plasma gun). Solid projectiles may be free-flying (as with bulletss and artillery shells) or tethered (as with Taser guns, spearguns and harpoon guns). A large-caliber gun is also referred to as a cannon.
The means of projectile propulsion vary according to designs, but are traditionally effected by a high gas pressure contained within a shooting tube (gun barrel), produced either through the rapid combustion of propellants (as with firearms), or by mechanical compression (as with air guns). The high-pressure gas is introduced behind the projectile, pushing and accelerating it down the length of the tube, imparting sufficient launch velocity to sustain its further travel towards the target once the propelling gas ceases acting upon it after exiting the end of the tube. Alternatively, acceleration via electromagnetic field may be employed, in which case the shooting tube may be substituted by guide rails (as in railguns) or wrapped with magnetic coils (as in coilguns).
The first devices identified as guns appeared in China from around CE 1000. By the 12th century, the technology was spreading through the rest of Asia, and into Europe by the 13th century.