Lung infections are treated with antibiotics which may be given intravenously, inhaled, or by mouth. Sometimes, the antibiotic azithromycin is used long term.