Closed-circuit terminals (CCTs) are used to lock important access points, usually security doors or gates. To hack them, hold your Hack button and profile the locked door or the CCT to reveal the dataflow. Dataflow are red lines starting at the CCT and ending at the locked entity or entities; for example, one CCT can unlock multiple gates. NetHack view also reveals the dataflow.
You must now unlock and shut down the CCT with a physical hack. Once this occurs, the dataflow turns from red to blue, and the entity (door or gate) can be unlocked with a simple hack (it, too, turns from red to blue).