Hi! Sometimes I feel pain in my lungs. I smoke. Why do my lungs hurt? What can it be? Do I need to visit a doctor?

Any number of things. It is impossible to diagnose this vague pain over the internet, but your smoking makes lung cancer a significant concern. You need an exam, imaging, and proper history done by a doctor.