If you think of the historical path of yoga kind of like an hourglass, with various threads moving together, and then moving out into diverse variations at the center of the glass is Patanjali's “Yoga Sutras”. It is harder to see that today as the flow of yoga has become very asana focused, and as the philosophical and cultural underpinnings and shared belief systems of practitioners have shifted so much. But those whose practice digs deepest usually reach a place where they uncover the sutras.
The sutras speak of the components of yoga practice still recited today: Yama, Niyama, Asana, Pranayama, Pratyahara, Dharana, Dhyana, and Samadhi. At the time the sutras were written the first and last of these would have had precedence. Today that pride of place is given to Asana, and to some extent Pranayama, (breath work) or Dhyana and Dharana (roughly the mental practices). I think though there is something to be learned from understanding what the Yamas and the Niyamas are, and to thinking about their application to our lives.
Roughly together they are the ethical, or moral code of yoga: the to do list, and the not to do list. Though we might not normally think of a moral code in relationship to the practice of yoga I do not think it is such a strange idea. I think I have written before about understanding the human as a being of many aspects: physical, intellectual, emotional, social, and so on, and that developing only one aspect while letting others atrophy is as counterproductive as doing leg presses on your right leg and never working the right. In addition you can see the benefits for physical disciplines and sports of having a shared code. A person who has no code of fair play will happily cheat to win. A person who does not see their body as valuable, or sees attention, or riches as more valuable will by quite ready to inject whatever might make their muscles bigger. A person with no code of shared responsibility for the world and each other easily slips from self improvement to narcissism.
The most important of the Yamas is nonviolence. That is probably still the one with which most people are familiar. But the others are: truthfulness, non stealing, sexual control, and non hoarding of possessions. It is often said that they have to do with how the yogi behaves in relationship to others. The Niyamas are more devoted to how one is with oneself. So sauca, or cleanliness can mean taking a shower, or can mean trying to avoid the poison of hatred and resentment. Santosa, or contentment is about that state of peacefulness where we are (Remember the scene in the old movie “Gone with the Wind” where Scarlett has a mouth so full of food she cannot speak, and is gesturing to the waiter carrying more?) Tapas are austerities, are practices of tolerating the pain and suffering of daily life. (Generally this does not mean yogis should go sit in the snow on purpose or cause themselves hurt on purpose. Aside from being rather silly, and dangerous, it absolutely goes agains the First Principle: non violence). On the other hand, it does mean that one sometimes has to get dental work and one does one's best to understand and tolerate it. Svadhaya originally stood for devotional study, and Isvara-pranidhana meant devotion to God.
I would like to work a bit backwards and say a bit of what I understand of the last two. In a pluralistic society the understanding of what is a devotional text, and what God is is something each person entering the yogi path must decide for themselves. The point is that it is part of who we are to ask such questions and seek understanding, but that the seeking is what matters. Structurally yoga grew out of a primarily Hindu culture, but people of many faiths, or no faith practice it now. And that is one of its strengths. Whether your devotional text is to chant 'Om Shanti', or read the 'Sutras', or St. Thomas Aquinas, or Thoreau, or Einstein, or an encyclopedia of science, our paths are different. But we must and should walk them, and we will make the pilgrimage of life in greater strength if we can walk together.
It is also probably important to look at brahamacarya. Yoga was originally one of many traditions the end point of which is liberation from the world. In that context giving brahamacarya the more literal translation of 'celibacy' makes sense. If you see the sensory world as a trap and a vale of pain and suffering, and the goal to get beyond that, then you can see that physical pleasure is going to be more likely to bind you to that physical world. There are yogis today who do maintain this practice literally. But I think more people would see this as one of the ideas that they would not find helpful. That is, both that life is something to be liberated from, rather than to be engaged with and enjoyed, and that physical pleasure is good. However, what yoga reminds over and over is that balance is everything, and I think it is helpful to understand it as control. Again we always come back to the idea of balance, self understanding, and self control.
But the most important is finally the first, and the best known. Ahimsa. Where these are dueling requirements this comes first. Truth is a Yama. Do you tell the abusive person asking you that their partner is hiding behind you? It may be the truth, but it is not Ahimsa. The Sutras would be pretty rigid that Ahimsa means a yogi is absolutely not to eat meat. Ever. For any reason. If they are on the yogi path. But again, if we want to reunderstand this within a context of …. it is part of the natural order that balances the web of life that some creatures are carnivores, but that if we are to eat meat it must be done without torturing the animals to do so, or polluting the earth we share with industrial by products.
Many yogis will violently disagree with me on this. I think that is fine. I do not want to state that we must all stop swearing at cars that cut the queue onto the turn off. I do not want to suggest that everyone has to give up their glass of merlot. I do not want to suggest that everyone has to start meditating every day. I just want to suggest that the vinyasas and down dogs are just like the part of the tree we see above ground. And a lot of the benefits of the practice have to do with understanding ourselves as more than muscle and sinew and skin. And that no one teacher has the answers for you. As that old Chinese proverb goes: The teacher opens the door; you must enter yourself.