Most are caused by muscle strain when lifting or doing something with your back in a weird position. I think you get continual muscle spasms as well. So the nerves are irritated, the muscles contract and it gets painful so you have to basically get the muscles to relax.
Sometimes the muscles along the hips can be involved as well and figuring out a way to stretch them will help. Chiropractors like to realign them.
Keeping up your core strength is apparently the best option though.