The most common cause of back pain is usually a muscle strain or muscle sprain and most of us, in our lifetime, will experience this at one time or another. These injuries or micro-injuries to the muscles, usually, occur due to strain to those muscles and they tend to recover on their own. The timeframe tends to be several days to 1-2 weeks.
Usually to support that, initial rest - just first day, perhaps two days, of reduced activities - but no more is required for that. Icing, heat, medications that reduce pain and inflammation, like over-the-counter non-steroidal anti-inflammatories like ibuprofen, can be used utilized, and manipulations and physical therapy tends to be very helpful - not only to alleviate the current symptoms, but also to reduce the rate of recurrence. So, in order to prevent this from happening again, we must make sure that the muscles are now fit to respond to the forces we are applying to them.
And patients often wonder, "What's a good timeframe; when is it important to see a doctor?" Usually, these muscle sprains and strains will resolve within several days to 1-2 weeks. If by the time of 1-2 weeks, you don't see a resolution or a trend toward resolution, that would be a good time to seek medical attention because this could be due to some underlying problem that will not resolve and should be addressed sooner rather than later.