To dream of prison represents feelings of confinement or restriction. You can't do what you want or feel held back. You may feel forced to do something or to give up something. Feeling trapped in a situation you can't get out of. Feeling repressed.
Alternatively, dreaming about being in jail may reflect feelings about discipline or consequences. Feeling that you are being punished.
Dreaming of being in a prison may reflect feelings of being stuck in a relationship that isn't benefiting you anymore. Feeling that your life revolves around keeping someone else happy
Example: A woman dreamed of being locked in a prison by a man with a "rat hood." In waking life she felt trapped in an unhappy marriage that she couldn't leave because her husband had too much control over the family finances including the children's college education fund.
Example 2: A man dreamed of being in a prison cell. In waking life he was in a hospital and they wouldn't let him out.
Example 3: A man dreamed of being trapped in jail and wanting out. In waking life he was having serious doubts about going through with his wedding. He felt trapped in the relationship. He ended up cancelling the wedding and ending the relationship.
Example 4: A woman dreamed of being inside a hospital jail. In waking life she felt stuck in a failing marriage that she was trying in vain to improve.
*Please See Penitentiary