The term "gun" is often used synonymously with "firearm", but this is common only for civilian usage. In military usage, the term "gun" refers to artillery that fires projectiles at high velocity, such as naval guns or tank guns.
A gun is any of several types of object that propels another object or projectile. The projectile is generally fired through a hollow tube known as the gun's barrel. I know a LOT about them.