The closet, metaphorically speaking, is a cliche used to describe a place, thing, or personal history which is purposely hidden from view, from which exposure would provide either embarrasment to the person doing the hiding or - if the object in question resulted from a criminal act - prosecution in a court of law. The term "skeletons in the closet" describes this metaphor. It is also used as a term within the gay community, as advocates sometimes speak of homosexuals being "confined to the closet" due to "prejudice" against them.
Often there is pressure from other homosexuals for a suspected homosexual to "come out of the closet". If he refuses, he is often "outed" against his will. In many cases, the person may not be homosexual at all and his reputation is ruined.