It can also be accompanied by a dry cough, hoarseness, and difficulty swallowing. Sore throats can be treated with over-the-counter medications such as throat lozenges or sprays, or by taking ibuprofen or acetaminophen for pain relief. In some cases, a doctor may prescribe antibiotics to treat a bacterial infection.