Initially, it is best to ice the injury. If there is swelling, heat can inflame it more. Resting the back essentially means lying on a firm, flat surface. Avoid lying on sofas that generally don't provide a good supportive surface for proper healing. If in a few days you don't feel relief, it is important to have it looked at by a physician to determine the nature of the injury and refer you to physical therapy.
Back pain can arise by straining or spraining the muscles or joints of the back.
If there is weakness or shooting pain in the leg, it may be more serious. If you think of it like a jelly donut, a herniated disc would be like the fluid, or jelly, leaking out when pressure is exerted on the disc. It loses its cushion and irritates the nerve causing pain. After the nature of the injury is determined, the physician often prescribes an anti-inflammatory medication, along with an appropriate regimen of physical therapy. Education is a key part of the physical therapy.