Almost all firearms have the same basic barrel configuration.
While the tube-like shaft that runs the length of a firearm is commonly referred to on the whole as the barrel, different sections have specific names. As a rule, all firearms have the same barrel configuration of a chamber at the back, the muzzle at the front, with the section in between technically being the barrel itself. The exception to this is the revolver which does not have the ammunition loaded into the rear of the barrel.
The opening at the front end of the barrel though which the projectile exits is called the muzzle. The muzzle may sometimes have small holes called ports cut into its sides. Ports help to disperse the gas created by the ignition of the gunpowder. Ports direct the gases out the sides of the barrel, thus reducing the amount, and thereby the force by which the gas exits the muzzle, reducing recoil. The top of the muzzle will also usually have the front part of the gun’s sighting system attached to it.
The back end of the barrel is called the chamber. The chamber is also known as the breech as this is the part of the barrel that has the opening that allows the ammunition to be chambered into the barrel in preparation for shooting. The rear of a revolver’s barrel is referred to as the breech, and not the chamber. This is because the ammunition in a revolver is not loaded directly into the back end of the barrel. Instead the chambers in a revolver are located in the cylinder and not considered part of the barrel.
The inside of the barrel of both rifles and handguns have spiral grooves cut into it called rifling. The ridges between the grooves are called lands and cause the bullet to spin as it travels down the barrel. This gives the bullet a gyroscopic effect causing it to attain a more stable trajectory, increasing both range and accuracy. Shotgun barrels do not have rifling as the spinning motion would cause the shot pattern to spread out too quickly, severely reducing its effective range.