Antibiotics work by affecting things that bacterial cells have but human cells don't. For example, human cells do not have cell walls, while many types of bacteria do. The antibiotic penicillin works by preventing a bacterium from building a cell wall.