Beer kegs are made of stainless steel, or less commonly, of aluminium. A keg has a single opening on one end, called a bung. A tube called a spear extends from the opening to the other end.
There is a self-closing valve that is opened by the coupling fitting which is attached when the keg is tapped. There is also an opening at the top of the spear that allows gas (usually carbon dioxide) to drive the beer out of the keg. The coupling fitting has one or two valves that control the flow of beer out of and gas into the keg. The keg must be in the upright position, that is, with the opening on top, for the beer to be dispensed.
Kegs can be contrasted to casks, which have two or more openings and no spear.