1) Listen to your body
Yoga shouldn’t hurt. If it doesn't feel right, or your starting to feel strain in a vulnerable part of the body (e.g your knees, neck or lower back) then ease off and take a breather. Your body is yours so take care of it and work within safe limits, especially while you are getting started.
2) Start gently and build it up
Don't go to your first class expecting to do everything. Whether you are seeking physical strength or improved breathing, connecting with yourself, focus, or relieving stress, there is no magic wand or quick fix to achieve these aims. Incremental changes will happen, and allowing yourself time to add challenges and layers of technique as you get used to the practices will bring the most benefit. Everyone has limitations, so be gentle with yourself and don’t be tempted to push it too soon.
3) Regular practice
If you drop in to a class from time to time, your body will always be starting from the beginning and if there are any vulnerabilities, they are more likely to flare up. Regular practice will allow you to develop strength and stamina so that you can then further your practice. If issues or niggling pains do start to emerge, you'll have time to understand what triggers them and find ways around them.
4) Talk to your teacher
Your teacher should be well-trained in a wide-range of injuries and ways to adapt the postures and techniques to suit you. Not all yoga teachers have this training (especially is they took their training over just a few weeks or months where they may only have covered postures, choreography and basic anatomy). Make sure your teacher understands any injuries or past vulnerabilities that you have so they can suggest alternatives or adaptations. You need to take some responsibility here and pro-actively talk to your teacher to ensure they can support you.
5) Yoga should never hurt
Worth saying twice. Really. If it hurts, your body isn’t ready to go that deeply into it so ease off. Yoga classes aren’t (or shouldn’t be) competitive. Just because your neighbour on the mat next to you can do it, it doesn’t mean you should be able to. The class is there to benefit you, and every body in the class is different. So do things that will be helpful and have the wisdom and patience to know when to rest and wait for the next pose.
Enjoy safe yoga practice and you will reap the rewards for years to come!