A chastity tube is a metal (or equivalent) tube (or equivalent) which fits over the penis (and sometimes the scrotum as well) in order to prevent erection and/or stimulation. It may be held in place by a piercing such as an ampallang, apadravya, frenum, or, most commonly, a Prince Albert piercing. Others can be attached via other piercings or even without a piercing. Many are lockable.
It is essential to note that if you wear a chastity tube that is too tight, it can act as an irremovable cock ring. The resulting strangled priapism can end in penectomy if not treated immediately. If you have an erection that isn't going away and your chastity tube is stuck, it is very important that you seek immediate medical attention. The longer you wait to go to the hospital if this happens, the higher the risk is.
Note: Don't go to the hospital just because you can't get the chastity tube off — it's the erection that's the problem.