Used to treat certain infections caused by bacteria such as bronchitis (infection of the airway tubes leading to the lungs); pneumonia; and infections of the skin, ears, sinuses, throat, and tonsils.. Cefdinir is in a class of medications called cephalosporin antibiotics. It works by killing bacteria. Antibiotics such as cefdinir will not work for colds, flu, or other viral infections. Using antibiotics when they are not needed increases your risk of getting an infection later that resists antibiotic treatment.