It sounds like you have a back spasm. Pain can be severe and very debilitating. I have had this a few times in my life. Usually after something very simple like bending over, sneezing, getting out of a chair, etc. No body understands your pain unless they have had them.
Rest, heating pads, pain relievers, icy hot pain patches and warm baths are most of the things I do. If you have someone to help, low level vibrating massage is useful in my opinion. These can take weeks to fully recover from. Should start to see some improvement in 4-5 days.
One thing I wish is that I would have gone to a PT after my first one to learn back and core exercises.
Some pain docs and PTs I know say that seeing a PT ASAP can be helpful even in the stage you are in. I have not done this so don't have personal experience.
Some warning signs indicating you need more urgent attn from an MD would be fever, weakness in your legs or bowel/bladder incontinence.
Good luck. These spasms are absolutely terrible.