A residential institution or total institution is a facility of work and residence in which a group of people who can't live by themselves, are attending a program, have certain jobs, etc are cut off from the rest of society and together lead cloistered and regimented lives. Reasons for residence in a total institution include needing care due to things like disability or destitution, attending a multi-day\night program, punishment, etc.
Total institutions are highly structured with rigid hierarchies, stringent rules and schedules that regulate every aspect of life. Privacy and civil liberties are limited or non-existent in total institutions and there's a process of dehumanization in most types of facilities. The dehumanization usually includes things like stripping inmates of personal property (with the exception of things like approved medical devices such as eyeglasses with restrictions), forcing them to wear uniforms, etc in an effort to enforce uniformity and discipline.
Examples of residential institutions include