The barrel is the part of a firearm which extends out of the firing chamber, typically a round tube-like structure.
Components of the barrel assembly
The breech is the rear end of the barrel assembly, just forward of the chamber. Most modern weapons are loaded from this end of the barrel.
It must be noted that in firearm design locking lugs are not part of firearm barrels (With the exception of various semi automatic pistols where the barrels lock into the pistol slide) but separate components attached to barrels (IE: Trunnions/Machined receivers/Barrel nuts). This is done for gas pressure safety reasons and headspace of the bolt/cartridge when chambering rounds.
The chamber is the part of a firearm that houses the cartridge, just prior to firing. It is a part of the barrel assembly, and is located to the rear of the bore.
The chamber acts to contain the pressure of the cartridge when it is fired, preventing the case from expanding too far (and thus exploding). The construction of the chamber is an integral part of a firearm's precision and reliability, and both must be balanced; a tighter chamber allows for greater precision, but less reliable feeding, and a looser chamber allows for greater feeding reliability, but less precision (as the cartridge is more free to move around, which affects the angle that the bullet strikes the rifling when fired, affecting precision).
Revolvers have multiple chambers contained within their cylinder; the chambers are not an integral part of the barrel in this case.
The freebore is the area inside the bore just forward of the chamber, but before the rifling. It has no rifling and is used to guide the bullet into the rifling when the cartridge is fired.
The velocity of the bullet is often measured at the muzzle or at a distance relative to the muzzle; it is measured in units of feet per second (fps). This measurement is useful for a bullet's external ballistics (its behavior in flight).
The bore is the interior of a barrel on a firearm. The surface is either smooth (smoothbore firearms), or rifled.
A flash suppressor is a device mounted on the barrel's muzzle, designed mainly to combat flash. As a side effect of some designs, it generally dampens recoil as well, though not as effectively as a compensator would.
A thread on the barrel is mostly found on the muzzle and allows the use of compensators/supressors etc. The rear thread attaches the barrel to the trunnion/machined receiver and on General Purpose Machine Guns the barrel nut.
Depending on type of firearm, the barrel length will vary. Most rifles and shotguns have barrel lengths of around 16 inches, with some having barrels as long as 28 inches, or as short as 7 inches. Most semi-automatic pistols have barrel lengths of 3 to 5 inches, with longer barrels generally being used in competition. Revolver barrel lengths are similar to semi-automatic pistol barrel lengths. Depending on the propellant used, longer barrels will generally produce greater velocities with most ammunition, resulting in greater terminal ballistic performance and greater precision at longer ranges, due to the projectile dropping less over comparable ranges. Too long of a barrel will result in the velocity of the projectile dropping, however, as there is more drag due to the rifling in the bore and less pressure pushing the projectile, given the larger area that the gases from the propellant are allowed to expand.
A barrel that is free-floated is only attached to the receiver. Nothing else (the stock, forearms, etc.) touches the barrel, with the exception of barrel-mounted sights. This is to prevent other parts from interfering with barrel harmonics, making for a more accurate rifle. The respected rifle and custom stock maker McMillan reported that 98 percent of rifles are most accurate when their barrels are free-floated.  Many .50 caliber rifles address the free-float issue by simply not having forearms at all, so nothing can possibly disrupt barrel harmonics. A common problem with accurizing semi-automatic rifles is, due to the gas port and tube, many semi-automatics cannot be completely free-floated. The solution is to firmly anchor anything that touches the barrel so its harmonic vibrations are consistent.
A squeeze bore is a type of barrel rifling that narrows the projectile as it leaves the barrel. This helps increasing the gas pressure and accelerating the speed of the projectile improving its range and ballistics.