I've never been to jail or prison and hope to never be but yes prisoners are always given manuals to read on what the rules are and the consequences the prisoner will face should they decide to break the rules.
When a prisoner is first admitted to prisons they're usually put in a research and diagnostic unit or also "RDU" where they're medically assessed, given the prison rules, and will wait until they are found a place where they're to be placed.
They will then also determine there custody level during the RDU stay before being placed in a permanent prison facility where they'll complete there sentence or spend the rest of their life if they have life without parole.