Thanks for using Healthcaremagic,
I have gone through details provided by you, this pain might be due to spasm of muscles of back and other possibility is may arise from membranes covering lungs known as pleura( Inflammation of pleura.
This can be easily detected by clinical examination to find painful muscles or physical signs of pleural inflammation
You may want to visit Physician for proper examination and if required complete blood count
and an x ray
chest may be done to confirm exact cause of pain.
Treatment would depend on cause analgesics and antibiotics may be required and local hot fomentation is helpful.
Hope this information is useful to you.
Wish you speedy recovery and good health.
Dr.Akhilesh Dubey M.D.