Ceiling Turrets are seen in several places within the Black Mesa Research Facility, concealed within the ceiling in an armored cupola. Some are activated or deactivated by a switch, some deploy automatically. When a switch is available, the player can always use it. If not, the Turret can be disabled with explosives or gunfire.
The Ceiling Turrets do not distinguish friends from foes. Therefore, they will attack anything in range, including all Black Mesa employees as well as Xen creatures.
The Ceiling Turrets were set possibly to deal with potential escaped specimens, or are perhaps a leftover from the facility's days as a military missile complex.
In Decay, Rosenberg simply refers to them as "sentry guns".
The Ceiling Turret comes in two variants: the tri-barreled gun (that appears in Half-Life only) and a smaller single barreled gun (that appears in both Half-Life and Decay).