The problem with the back is that it is constantly counter balancing and we do not realize it.
So there are 2 main things you have to do.
One is that we constantly strain our back too much without realizing it, so you have to prepare the back muscles ahead of time, by giving them adequate circulation. That mean preventive stretches before exertion. I find the best is to kneel on the floor, knees apart, then slowly let your body come down to the thigh. First one side, then back up and do the other side, and repeat. That stretches the back muscles out, helps you feel each one, and then you can consciously relax them. If you totally relax the back muscles and stretch them out, you can touch your chin to your knee. But don't try to do too much at once. It should be a daily thing, like in the morning or before any heavy back strain.
One of those lower back elastic supports can help, if nothing else to remind you not to strain the back too much. Like when lifting stuff, bend the knees, don't bend the back.
For immediate pain, ibuprofen, but not more than a few days. Cold ice packs right away to reduce inflammation, but heat is better the next day, for healing.