Torture
Torture was the practice of inflicting extreme pain on a captive subject.

While the pain inflicted during torture was often physical in nature, it could also possess an emotional or mental character.

Purposes 
Torture (or the threat of torture) could be intended to:

Serve as a disincentive to the subject against withholding information from the torturer
Force the subject into an altered state of mind in which they were more likely to confess misdeeds or swear on lies, as a consequence of the autonomic elevation of neurotransmitter levels
Intimidate the subject
Induce someone responsible for the safety of the subject to provide information desired by the torturer
Punish the subject for disobedience or unsuccessful escape from captivity
Condition the subject to accept the torturer's authority without question
Please the torturer, for example, sadism
Test the reactions or limits of the subject

Torture could be directed not only to the subject tortured, but to persons forced to watch or whom the cruelty of the act is told for any purpose described above, as well as in order to force sacrifice. 

Torture was considered by some to be useful during interrogations. However, Captain Jean-Luc Picard asserted to Gul Madred that "torture has never been a reliable means of extracting information. It is ultimately self-defeating as a means of control. One wonders it is still practiced." ()

Acts of torture were in theory banned by the Seldonis IV Convention, however governments who were signatories to the treaty would often attempt to find ways around this restriction. The Cardassians were one such example, justifying their torture of Jean-Luc Picard in 2369 by claiming the treaty only applied to those acting on behalf of a treaty signatory, which Picard would not admit to doing. ()

In 2259 of the alternate reality,  assured  that a Klingon patrol would torture, question, and kill them and the other crew members who were inside their K'normian trading ship. ()

Incidence 
Races with members known to use torture included:
Anarchists of Tilonus IV
Andorians
Ardanans
Argelians
Bajorans (alternate universe)
Cardassians
Ekosians
Humans
Kazon
Klingons
Platonians
Romulans
Suliban
Vulcans (alternate universe)

Torture was common in the mirror universe. In 2371,  tortured  slaves in an attempt to increase the amount of ore that they processed in 's ore processing center. Doing so, along with bribes and executing unproductive slaves, failed to increase production enough to meet quotas set by the Klingon-Cardassian Alliance. Intendant  suggested randomly executing workers instead. ()

Torture was also a common practice in Earth's authoritarian and anarchic nation states prior to the founding of the United Earth government. ()

Officers of the Andorian Imperial Guard also tortured their prisoners and beat and kicked them during their interrogations. In June of 2151, Commander Thy'lek Shran tortured Captain Jonathan Archer to get information about a Vulcan listening post at P'Jem from him. ()

In August of 2151, Matthew Ryan and the crew of the  held a Nausicaan as prisoner and tortured him during interrogations to get the frequencies of the Nausicaan ship shields from him. Ryan kicked the Nausicaan into his  with his foot. ()

As part of a bluff to the con artist Dala, Tuvok stated that torture was commonplace in Telsian prisons. ()

Appearances 
 
  – Klaang appears to have been tortured when Archer and Tucker rescue him from the Suliban helix
  – T'Pol and Malcolm Reed are tortured by Silik
  – An Osaarian is tortured by Archer
  – Archer is tortured by Dolim
  – Doctor Lucas and his assistant are tortured by the Augments
  – Soval is tortured by Shran
  – Terev is tortured by Major ,  and Reed are tortured by Captain Forrest, the Tholian prisoner is tortured by 
 
  – James T. Kirk is tortured by Tristan Adams
  – Leonard McCoy and James T. Kirk are tortured by Vians
  – Governor Cory and Kirk are tortured by Garth
  – Vanna is tortured in interrogation by Plasus despite protest by Kirk
 
  – Lieutenant Commander Geordi La Forge is tortured by the Romulans via his VISOR implants
  – Captain Picard is tortured by Gul Madred
 "" – torture is used by the anti-government factions
 
  – O'Brien is tortured by the Cardassians
  – Odo is tortured by Elim Garak
  – Luther Sloan is apparently tortured by the Romulans
 
  – Commander Chakotay is tortured by Maje Culluh and Seska
  – Crewman Noah Lessing is tortured by Captain Kathryn Janeway
 :
  – Captain  is tortured by Nero

References 
 – Ro Laren mentions that she had to watch her father being tortured by the Cardassians
 – Julian Bashir was eager to help the Ennis and Nol-Ennis to end the state of torture and reprogramming the artificial microbes so that they could die.
 – Kira Nerys mentioned the murders and torture which happened at the Gallitep labor camp during the Occupation of Bajor.
 – Elim Garak explained that living on Deep Space 9 is torture for him.
 – Tora Ziyal stated that Dukat informed her that his father was tortured and killed by Garak.

External link 
 

de:Folter
Crimes
Punishments