A cock cage is a device which encloses either just the penis, or both the penis and testicles, usually attaching at the base of the testicles. They are commonly made of stainless steel or medical-grade plastic and will often have a way of locking them via a padlock so they can't be removed. Typically they have an appropriate hole or opening to allow urinating.
Generally speaking, the purpose of a cock cage is to enforce male chastity. They limit what the cock can do and in this respect are similar to the larger cages used in some forms of metal bondage which limit what the whole person can do or experience. Once a male is wearing a cock cage they can't have an erection, can't have intercourse, can't masturbate, and frequently their testicles and penis are fully enclosed inside the cage and can't be touched at all.
A typical cock cage
Figure 1 shows a cut-away view of one of the more common types of cock cage. These are made of medical-grade plastic and are usually transparent. The cock cage itself completely encloses the cock and testicles. Once in place the two halves of the locking collar are attached and locked together with a padlock. The locking collar prevents the cage being removed. A hole in the end of the cock cage permits urination.
The cage itself is solid plastic and it's not possible for the penis to become erect while in the cage. The cage won't bend or flex to allow it. Intercourse and masturbation are also impossible while the cage is in place.
Cock cages which simply enclose the cock come in a wide variety of types. The type described basically provides a loose-fitting container for the cock. Others tightly wrap around---or even crush---the cock and balls and may be made of leather, stainless steel, or both.
A more painful variant of the cock cage may have spikes or teeth on the inside which bite into the cock when it begins to engorge with blood as it becomes erect. Some of these types of cock cage also fully enclose either just the cock or both the cock and the testicles.
The "Kali's Teeth" type of cock cage is---more accurately described---a cock collar with spikes on the inside (figure 7). It clamps onto the cock and generally causes no discomfort, pain or limitation on the use of the cock until the cock becomes erect. A cock becomes wider as it becomes erect and the non-erect cock can fit easily inside the Kali's Teeth collar without the spikes digging in. As the cock gets wider with an approaching erection the spikes dig in, usually quite painfully.
While a "Kali's Teeth" type of collar is not as effective at enforcing chastity as a fully-enclosing cock cage---because a horny guy will usually find a way, even if it involves a lot of pain---they are excellent for sexual teasing and erotic denial. Stroking or caressing a guy's cock to get him erect when he's going to be in major pain when he does so is very cruel... and often exactly what his partner wants!
Gates of Hell
The Gates of Hell are a series of metal or rubber rings, usually interconnected by a leather strap, as shown in figure 8. The number of rings can be anywhere from three to seven, though five is perhaps the most common. The largest ring (shown at the top right of the figure) fits over the testicles to hold the Gates' in place and prevent it sliding off the cock.
Gates of Hell come in a range of sizes and can be chosen to be a snug fit when the cock is not erect, but to be tight, uncomfortable, and very painful during a full erection.
Gates of Hell and orgasm denial
When used for orgasm denial in BDSM, the size of the Gates' is chosen so the victim's erect cock is too large to comfortably fit the rings. This makes erection, and certainly orgasm, quite painful and even impossible.
Gates of Hell and sexual intercourse
Although slightly off topic for this wiki, some Gates of Hell can be used during sex for increased pleasure. Instead of being selected to be painful, the Gates' can be chosen so the rings are simply a snug, but comfortable fit during an erection. Then, if there are no sharp edges, a condom can be fitted over the Gates of Hell and the pronounced ribs of the Gates' can greatly enhance the sensation in the woman's vagina.
Additionally, the ring around the base of the testicles pushes forward and tensions the man's balls and this can increase pleasurable sensation as the balls press up (bump) against the female's vulva during thrusting.
Dominance and submission
In the D&s arena cock cages are an explicit way for a dominant to control his or her submissive male's sexuality. The dominant controls when their partner can express themselves sexually or get sexual satisfaction. If they leave the cock cage in place for extended periods then they are effectively emasculating their partner.
In the short term, cock cages are useful for sexual teasing or sexual denial, and even as part of torture games. There are some similarities to tie and tease because in both cases the submissive can't satisfy themselves sexually because of the restraint (one with the cage, one with rope) their partner has placed on them.