It means locking themselves in a cloister. Withdraw or isolated from others. Usually it is an enclosure by their own free will. Withdrawing, enclosed, isolated, depart.
put a person in a jail, or enclose it in part.