Penicillin-type drugs, such as penicillin and amoxicillin, are some of the most commonly prescribed antibiotics. Other common classes of antibiotics include cephalosporins (such as cephalexin), macrolides (such as azithromycin), and lincosamides (such as clindamycin). All of them are used to treat bacterial infections, either by killing bacteria or preventing them from reproducing.