In Yoga, the Yamas and Niyamas are often talked about in one breath because they are closely related to each other. Simply said, Yamas are the things one should not do (restraints), and Niyamas are the things one should do (observances).
Basically, Yamas and Niyamas are moral i.e. ethical rules, commandments and obligations for the “right way of living.” Within Yogic practices, the goal of these rules is to achieve a balanced body and mind in order to be able to meditate and finally come to Spiritual Enlightenment (Moksha) or Self-Realization.
Yamas and Niyamas are well-known from Patanjali’s Yoga Sutras, being the first two steps (or limbs) of the Eightfold Path of Yoga (Ashtanga Yoga). Nevertheless, these ethical rules appear already long before Patanjali’s Sutras, in a broad range of ancient Hindu scriptures.
Some well-known Yamas are: Ahimsa (non-violence), Satya (non-falsehood), Asteya (non-stealing), Mitahara (non-excess in food), Ksama (non-agitation about suffering), and Daya (non-prejudice), among others.
Some well-known Niyamas are: Shaucha (purity of mind, speech and body), Santosha (contentment, acceptance, and optimism), Tapas (austerity and self-discipline), Svadhyaya (study of the Self), Japa (Mantra repetition), and Dana (generosity and charity), among others.