Most likely a muscle spasm. Please do hot fomentation thrice a day for 1 hour atleast. Take muscle relaxants and analgesic medications for atleast a month. Avoid activities that increase your pain. Reading, working on laptop, viewing television while u are lying down are completely formidable activities.
Please get interferetial therapy( at physiotherapy center) for relieving acute pain. Donot start with exercises from day 1
Next Steps
Start exercising once u are better after about two weeks to stop it from recurring again. All the best