A monastery (vihàra or àràma) is a place where monks or nuns reside. A place where nuns live is correctly called a nunnery in English although this distinction is not made in Pali.
The first Buddhist monasteries/nunneries were little more than grass huts or shelters erected in parks which had been donated to the Buddha. They could be of five types – a house, a hut, a rounded hut, an elongated hut, a cottage or a cave (Vin.V,146). The first Buddhist monastery was the Bamboo Grove in Ràjagaha, gifted by King Bimbisàra.
In time the simple buildings developed into permanent structures and finally into sometimes very large complexes. One of the largest monasteries in ancient India was Nalanda, which in the 7th century accommodated 10,000 monks. One of the largest monasteries in the world today is Mahagandoaya, in Manadalay in Burma, which has a permanent population of about 3000 monks. Most monasteries however, are, and always have been, fairly small. For centuries monasteries/nunneries have acted as the religious, cultural, educational and economic centre of the community around them.
Buddhist Monks and Monasteries in India, S. Dutt, 1962.