The spine supports the whole weight of the upper body so it is understandable that it sometimes goes wrong.
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 ie 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 to relieve inflammation. Your doctor will advise regarding further treatment if necessary.