Torture is when someone in authority intentionally causes severe pain or suffering for a specific purpose. Such as to get information or a confession out of you, to punish, intimidate or threaten you.
It can be physical, such as beating, forcing into a painful position or sexual, such as rape. It can be psychological, such as sleep deprivation or public humiliation.
Torture is illegal: outlawed internationally since the Universal Declaration of Human Rights in 1948. And 156 countries have signed the UN Convention against Torture. All forms of cruelty and humiliation are also outlawed.