You need to see a doctor or a Physiotherapist atleast to help you in this case. Most probably you hurt one of your ligaments while stretching for yoga
. The repair of that ligament has to be done to get back you in your normal routine and for that you need to have medicine, physio and restrictions of a few movements for a short period of time. once the healing is done you can move freely.
If neglected your problem could get worse and the ligament may suffer irreparable damage. Also do not get into postures where you feel pain.
Wish you a speedy recovery to health