A “gun”, as you so eloquently put it, is a mechanism that forces a small slug of metal down a metal tube at a high velocity, usually using expanding gases as a means of propelling the metal slug.
This mechanism is most commonly mounted on what is known as a “receiver”, which serves as the base-platform for the “gun” mechanism. The receiver houses the mechanism and numerous other features. It provides a stable insertion slot for the “bullets” to be fed into the mechanism. It also houses the “trigger”, which can be used to activate the mechanism.
A “gun” is defined by it’s ability to stably propel those metal slugs, or “bullets”, accurately and with deadly force.
“Guns” are further classified into different categories: Rifles, Handguns, etc.
Each category is further divided by how much of the explosive force of the gunpowder packed into the “bullet” it can handle, and what size “bullet” will fit in the gun.
“Guns” can be further distinguished by their manufacturer, but I’ll not get into that here.