A gun is a tubular ranged weapon typically designed to pneumatically discharge projectiles that are solid (most guns) but can also be liquid (as in water guns/cannons and projected water disruptors) or even charged particles (as in a plasma gun) and may be free-flying (as with bullets and artillery shells) or tethered (as with Taser guns, spearguns and harpoon guns).
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, 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 at the end of the tube. Alternatively, acceleration via electromagnetic field generation 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 around CE 1000. By the 12th century the technology was spreading through the rest of Asia, and into Europe by the 13th century.