Hard to say
This is hard to say without more information.
Do you only have the pain in classes or does it last in between classes. Do certain poses cause pain and others do not? Are you maintaining proper alignment during your poses? Is anyone checking your alignment? Are you doing more than your body can handle at the moment? Lost of questions to be answered and then perhaps the cause can be determined.