Penicillin works by interfering with the synthesis of bacterial cell walls. It inhibits enzymes involved in creating cross-links between polymers that make up the cell wall. This disrupts the cell wall structure and kills bacteria. Penicillin is ineffective against viruses, as they do not have cells or metabolism. While initially effective, overuse of penicillin has led to the rise of resistant bacterial strains through natural selection, as bacteria carrying resistance genes are able to survive and pass on those genes.