A cloister is an enclosed garden, usually surrounded by covered walkways. Because such spaces are often featured in buildings that house religious orders, cloister can be used to mean "monastery" or "convent."
In enclosed religious orders, monks and nuns withdraw from society to devote themselves to prayer and contemplation. In order to provide them with access to the outdoors while protecting them from contact with the secular world, the cloister became a common element of convents and monasteries. When used as a verb, cloister generally loses its religious connotation and means "to seclude" or "isolate." Don't get a lunch detention or you'll be cloistered in the classroom while all the other kids are running around outside.