The Vinaya (a word in Pāli as well as in Sanskrit, with literal meaning 'leading out', 'education', 'discipline') is the regulatory framework for the Buddhist monastic community, or sangha, based in the canonical texts called Vinaya Pitaka. The teachings of the Buddha, or Buddhadharma can be divided into two broad categories: ' Dharma' or doctrine, and 'Vinaya', or discipline. Another term for Buddhism is dharmavinaya.
At the heart of the Vinaya is a set of rules known as Patimokkha (Pāli), or Pratimoksha (Sanskrit). The Vinaya was orally passed down from the Buddha to his disciples. Eventually, numerous different Vinayas arose in Buddhism, based upon geographical or cultural differences and the different Buddhist schools that developed. Three of these are still in use. The Vinayas are the same in substance and have only minor differences. Buddhists in Burma, Cambodia, Laos, Sri Lanka, and Thailand follow the Theravadin Vinaya, which has 227 rules for the bhikkhus (male monastics) and 311 for the bhikkhunis (female monastics, though the female order died out centuries ago and recent attempts to restore it are controversial). Buddhists in China, Korea, Taiwan and Vietnam follow the Dharmaguptaka Vinaya (四分律), which has 250 rules for the bhikkhus and 348 rules for the bhikkhunis. Japan technically follows this, but as many "monks" in Japan are married, they are more rightly considered "priests" (ie specialists in performing ceremonies). Other Japanese monks follow the Bodhisattva Precepts only. Buddhists in Tibet and Mongolia follow the Mūlasarvāstivāda Vinaya, which has 253 rules for the bhikshus and 364 rules for bhikshunis (in theory, as the female order was never introduced in Tibet). However, the Dalai Lama has authorized followers of the Tibetan tradition to be ordained as nuns in traditions that have such ordination.). In addition to these patimokkha rules there are many supplementary rules.
The Buddha constantly reminds his hearers that it is the spirit of the rules that counts. On the other hand, the rules themselves are designed to assure a satisfying life, and provide a perfect springboard for the higher attainments. Monastics are instructed by the Buddha to live as "islands unto themselves". In this sense, living life as the vinaya prescribes it is, as one scholar puts it: "more than merely a means to an end: it is very nearly the end in itself."
Surrounding the rules is a range of texts. Some of these explain the origins of the rules - it is possible to trace the development of the rules from responses to specific situations or actions to a general codification. There are also a number of sutta-like texts that are more general statements about Buddhist doctrine, or that give biographical details of some of the great disciples and their enlightenment. Other sections detail how the rules are to be applied, how breaches are to be dealt with, and how disputes amongst the monks are handled.
It is thought that originally there were no rules and the Buddha and his disciples just lived in harmony when they were together. Most of the time they would have been wandering alone, but every year, during the monsoon season when travelling became impossible, the bhikkhus would come together for a few months. As the sangha became bigger and started accepting people of lesser ability who remained unenlightened, it became necessary to begin having rules.
It seems that initially these were quite flexible and were adapted to the situation. By the time of the Buddha's death there would have been a body of rules bhikkhus were expected to follow. In the Mahaparinibbana Sutta the Buddha, as part of his last teaching, tells the bhikkhus that they can abandon some minor rules, but that they should stick to the major ones, but there appears to have been some confusion over which was which. It was therefore decided that they would keep all of the rules. Immediately after the Buddha's death there was a council, at which all of the teachings were recited, collected, and sorted. Legend has it that the huge volume of teachings was recited from memory, with Ananda reciting the dhamma and Upali reciting the Vinaya.