Torture

Torture is a term for the infliction of mental or physical pain, as a form of punishment or during questioning.

Torture in classical times
Ancient peoples are known to have inflicted extreme pain as a punishment, such as crucifiction, nailing prisoners to crosses, and then letting them slowly die from shock and loss of blood.

Trial by ordeal
During the middle ages criminal suspects were subjected to painful ordeals which were regarded as opportunities to prove their innocence.

The inquisition
The Roman Catholic Church had an institution, the inquisition, tasked to detecting, and suppressing, heresy. Officials in the inquisition were authorized to employ a variety of painful procedures -- both during questioning, and as a form of punishment.