It means multiple things. In this context, it is the hollow tube in guns with hole in the other end and cartridge chamber in the other.
The bullet is charged through it by high pressure gas from the explosion inside the cartridge.
In this context, of course, there is no bullet, but it still refers to the extrusions from gun turrets or hull of a ship that shoot stuff into the direction they are pointing to.

Other meanings include an unit of volume, and it's different depending on which substance it's used to measure, and where. Oil barrel is 158.9873 litres, but UK beer barrel is 163.7 litres, US beer barrel is 117.3 litres, US non-beer liquid barrel is 119.2 litres and US dry barrel is 115.6 litres.
These are the most common meanings associated to this particular word.
