Because of the complex nature of the spine it is advisable to consult your doctor if back pain persists for more than a few days. If, as is usual, the pain has been caused by abuse, i.e. lifting too heavy weights etc., be sensible and take things easy. Take care to sit as upright as possible with a support for the small of the back.
Take aspirin or Paracetamol, which will not only relieve the pain but will help relieve the inflammation. Your doctor may well prescribe stronger drugs, heat treatment, gentle exercise or some kind of supportive corset.