Incarceration
Incarceration or imprisonment was the state of being confined to prison as a form of punishment for the committal of a crime. Those who were incarcerated were described as prisoners. 

When Captain James T. Kirk and his first officer Spock attempted to infiltrate the Ekosian Chancellery in 2267, they were discovered and taken to the Chancellery Detention Center. After being whipped, the two were due to be executed but were spared for one hour by Eneg (who was himself a member of the underground resistance). The two Starfleet officers then managed to escape with the help of crystals inside two wrist subcutaneous transponders. ()

The Federation penal system evolved to a point focusing more on rehabilitation rather than strictly outright punishment. Never the less, confinement for serious offenses was presumably still practiced where they occur. The uninhabitable planet Elba II operated a penal colony; because of its toxic atmosphere, escape would be fundamentally impossible. () The Federation established penal colonies in various locations; including one on Earth as a means of incarceration. ()

Miles O'Brien was incarcerated in an Argrathi prison for twenty s, during which he experienced several horrific memories. In recalling his memories, he explained that the Argrathi guards did not care whether or not their prisoners lived or died, noting that sometimes they would starve the prisoners for days to weeks at a time. O'Brien learned to adapt to this situation by eating as little as possible and saving the rest, following the times that he was actually fed.

The Argrathi also demanded that all offenders have a dormancy period each night. Their policies indicated that "any offender still active during the dormancy period will be disciplined." Death, as a form of discipline, was not uncommon. ()

In 2372, B'Elanna Torres, Tuvok, and later Darod were held in a Mokra Order detention facility. Kathryn Janeway, posing as a prostitute, and Caylem were able to get inside the prison and free the prisoners. ()

External link 
 
Legal procedures