Penicillin works by preventing bacteria from building their cell walls. So do its synthetic alternatives, such as amoxicillin. Tetracycline works by interfering with the internal metabolic processes by which bacteria manufacture new proteins for cell growth and replication.