Listen to your body
Stretch before and after. Ask the instructor for proper stretching technique.
Also, listen to your body. Never exceed what feels comfortable to you and stop immediately if what you are doing feels painful to you. Rest and then try again. If still hurts, it's no good for you and try something else.