Treatment for swollen lymph nodes (a.k.a. swollen glands) depends on the cause. For example, antibiotics will be prescribed for a bacterial infection. Using a warm compress and a pain reliever like Tylenol (acetaminophen) or Advil (ibuprofen) can help with discomfort until you get better.