Rountines are different areas that must be attended to at their respective time of day, with daily routine differing between prisons. The routines include Roll Call, Lights Out, Meals, Gym/Exercise Time, Job Time, Free Time, Lockdown, and Shower Time. If you are late to a routine (typically around 20-30 ingame minutes late, possibly later for long routines) you will gain heat each time a guard sees you.
If you are seen outside your cell after the allotted time for returning home for lights out, you will also set off a lockdown/get sent to solitary, as well as if your cell is seen empty after the allotted time. Counter these using a Guard Outfit and Bed Dummy.