Yama and Niyama are often called "the Ten Commandments of Yoga." Each one of these Five Don'ts (Yama) and Five Do's (Niyama) is a supporting, liberating Pillar of Yoga. Yama means self-restraint in the sense of self-mastery, or abstention, and consists of five elements. Niyama means observances, of which there are also five. Here is the complete list of these ten Pillars as given in Yoga Sutras 2:30,32: Ahimsa (non-violence, non-injury, harmlessness), Satya (truthfulness, honesty), Asteya (non-stealing, honesty, non-misappropriativeness), Brahmacharya (sexual continence in thought, word and deed as well as control of all the senses), Aparigraha (non-possessiveness, non-greed, non-selfishness, non-acquisitiveness), Shaucha (purity, cleanliness), Santosha (contentment, peacefulness), Tapas (austerity, practical spiritual discipline), Swadhyaya (introspective self-study, spiritual study), Ishwarapranidhana (offering of one's life to God).
All of these deal with the innate powers of the human being-or rather with the abstinence and observance that will develop and release those powers to be used toward our spiritual perfection, to our self-realization and liberation.
These ten restraints (yama) and observances (niyama) are not optional for the aspiring yogi-or for the most advanced yogi, either. Shankara states quite forcefully that "following yama and niyama is the basic qualification to practice yoga."