This could be just a muscle spasm and sprain. Sometimes, Such pain is seen due to compression of nerves in the Spine.
Next Steps
Take mild anelgesics with Antacid and rest and hot fomentation.
Health Tips
If pain persists beyond 3 days then consult a Neurospine specialist.