If the pain in your upper back were caused by a bad sleeping position, then it would improve as the day goes on. Since this pain is getting worse you will need to see a doctor again to have a thorough physical exam to find out the nature of the problem. This could be related to your smoking or it may have nothing to do with your smoking. A chest x-ray is a good place to start to see if a lung problem is the cause. A pulmonologist would be the type of specialist to tell if you need further testing to identify a lung problem. Once the cause is known treatment can be started to get you well again.
Pneumonia is inflammation of the lung. This is most commonly due to an infection. Inhaling bacteria or viruses is usually the way pneumonia is spread. Generally bacterial pneumonia will come on very suddenly while viral pneumonia will develop more slowly. Symptoms may include cough, back pain, chest pain, chest congestion, rapid breathing, shortness of breath, fever, chills, sweats, headache, weakness, tiredness, and a general feeling of discomfort and body aches. It is generally best diagnosed by chest x-ray in addition to a thorough physical exam. Treatment is based on the severity of your symptoms and the type of germ causing the infection. Antibiotics, like Zithromax® (azithromycin) will help a bacterial infection, but will not help a viral or fungal infection. Over time your body's natural defenses will clear a viral infection. An antifungal is needed for the uncommon fungal infection. You will need to see a doctor to know for sure if you have pneumonia and what treatment would be best for you.
Without further testing if is difficult to say what could be causing your upper back pain, cough, chest congestion and pain. A chest x-ray would be the next step. Whatever the outcome, this would be a good time to stop smoking. You may want to look at our Quit Smoking Topic Center at http://www.nationaljewish.org/topic/smoking_cessation.html for ways to help you to quit smoking. Also check with your doctor for other quit smoking resources in your area.