Foucault studied institutions such as psychiatric wards, hospitals, schools, and prisons, to figure out how they affected the people living in them. He was gay. He also studied the history of sexuality and, later in his life, wrote about homosexuality.