What are chastity belts?

Not only is there scarce historical evidence that chastity belts were an actual undergarment in the Middle Ages, but there is no logic to support their existence, either.