Guard Heat is a statistic found in the top left corner of the in-game HUD. It increases by 10 upon being sighted by a guard outside of the denoted area after sufficient time has elapsed, or not showing up to dinner, exercise, shower, etc. It can also increase if a guard sees you attacking someone, stealing something from a knocked out inmate, being in another inmate's cell or searching another inmate's desk. Once above 90%, any guards will attack on sight and tower guards will fire upon you. Guard Heat gradually degrades if you're doing what you're supposed to.
When you are knocked out Guard Heat resets to 0.