Back pain can have many causes; Some as basic as age, weight gain, weakness, or pregnancy and some as complex as genetics.
It is imperative to be evaluated by a Physical Therapist who understands the complexity of the Spine, who is going to search for the cause of the dysfunction and who will be able to manage the current signs and symptoms. A good Manual Physical Therapist will be able to determine where the pain has originated from and will be able to address "WHY" this has happened. Then there also needs to be core/hip stabilization training in order to mitigate future injury.
Back pain caused by improper body mechanics is easily preventable by keeping correct posture, lifting objects correctly, maintaining back and core strength, and avoiding movements that could potentially jolt or strain the back.