While Gautama Buddha was still alive, about 500 BC, some men and women in India who were following his teachings decided to try to live as pure and as good a life as they could. They left their work and their families and all their stuff to live alone or in small groups in the woods. They got their food by begging.
But during the monsoon season, it was too wet to live outside in the woods. Even while the Buddha was still alive, some rich Buddhist people began to build houses where these begging monks could live during the rains every year. Gradually most of the monks began to live in these houses, or monasteries, all year round in communities of monks. Each monk usually had his own cell inside the monastery, and all around the monastery there were orchards or gardens.
Central Asian and Chinese monks, about 900 AD
About 400 AD, some Indian Buddhist monks came to China and started Buddhist monasteries in China. In the beginning, the emperors welcomed them. These Chinese Buddhist monasteries were very successful and soon thousands of men wanted to join them and to give them money. As with Christian monasteries about the same time, the Buddhist monasteries got more and more involved in businesses like farming, trade, and banking. The leaders treated a lot of poorer monks pretty much like slaves, and the monasteries also owned slaves. By the 500s AD, the monasteries had gotten so big and so rich that emperors of the Chou and the T'ang dynasties closed many of the monasteries and took their riches for the government. Even so, Buddhist monasteries continued to be rich centers of learning and philosophy. Poets like Bai Juyi chose to live in Buddhist monasteries. Many children went to school there. Buddhist monks in China believed that making many written copies of Buddhist prayers would help you acquire merit. In order to copy the prayers faster, the monks worked on the invention of printing. By the 600s AD, the Japanese emperors paid to build many Buddhist monasteries in Japan, too.
But in the last years of the T'ang Dynasty, about 840 AD, Emperor Wu-Tsung really closed a lot of the Buddhist monasteries and took their money away. He ordered all the Buddhist monks and nuns to go back to ordinary life. After that, although many people in China were still Buddhists, the monasteries were not as rich or as big anymore.