A penitentiary is a prison for big-time criminals convicted of big-time crimes. Commit a serious crime like a murder and you won't just go to jail; you'll be sent to the penitentiary.
Penitentiary comes from the Latin paenitentia, meaning "repentance." A penitentiary is a place you are sent to make repentance for a crime committed. Penitentiary can also be used as an adjective to describe something done to show penance, as in the penitentiary scarlet "A" on Hester Prynne's chest. In the Roman Catholic Church, a penitentiary is a priest who administers the sacrament of penance, or hears people's confessions.