The practice of ashtanga yoga is the basis of all sorts of activities. This is because ashtanga yoga focuses on the mind, its activities and control them.
Yama is a very familiar name to the Hindus. They remember Yama as Yamaraja the god of death. The Hindus worship him and pray him to give a good painless death.
In yoga, yama is the practice of restraints. In this practice of yama, the practitioner has to strictly follow the modes and norms of yama.
Maharshi Pathanjali says,
Yama is - jathi desha kaala samaya anavachchinah saarvabhaumaa mahaavratam
In the beginning, the practice of yama is difficult. One has to follow the practice imposing restraints and restrictions.
The five yamas are the self-restraints and one has to impose these restraints on oneself.