Various medications are usually the best option for treating an infection, but the medications depend on the type of infection diagnosed. A minor viral infection, such as the common cold, can be treated with fluids, rest, and over-the-counter pain medication. However, some more serious viral infections are treated with antiviral medications. Bacterial infections are usually treated with antibiotics, but it's crucial for you to be sure you have a bacterial infection before using them. A viral infection, for example, won't be treated by antibiotics, and instead can create more powerful bacteria that are resistant to treatment.