The infirmary is the place located in every prison where you are sent when your health drops to 0. Located in the infirmary are beds and during the daytime, the infirmary doctor. In The Escapists 2, the Medics reside in infirmaries, idling around until someone is knocked out.
Resting on the beds will lower your fatigue/regenerate stamina and regenerate your health. There will also be a green door with a health symbol, you can open this while wearing infirmary overalls. Inside is a small supply room. (Not every infirmary has one of these, a prison will have multiple infirmaries but just one supply room.) The supply room contains a Desk with medicine-related loot, such as healing items (Medikit, Bottle of Medicine, Medical Mesh), food, more Infirmary Outfits and other things.
In the case of Center Perks, where the guards do not patrol the infirmary, it is a good place to dig tunnels and get to the Ventilation System (you won't need a Fake Vent Cover). However, in The Escapists 2, infirmaries always contain a Camera, meaning they are dangerous places to do illegal activities.