Monasteries were religious institutions that people joined to live a life of prayer, contemplation, and solitude for the forgiveness of sins and the betterment of mankind. Monasteries were not limited to all these things, but I gave you a small example. Hope it helped!