Depending on the type of infection, surgery is sometimes required. If your infection doesn’t improve with medication, it may be necessary to remove the infected tissue.