Through a combination of skill and luck Alexander Fleming discovered penicillin which changed the world. He noticed that mold growing on some cultures that were left standing killed the bacteria around them. Penicillin works by inactivating the enzyme that the bacteria use to make their cell walls. With holes in their cell walls the bacteria swell and lyse as they grow. Creating leaks in a cell's membrane is another way of killing cells.
Bacteria use hemolysin to put holes in our membranes.
Gramacidin is an antibiotic that similarly puts holes in bacterial membranes making them leaky and thus killing the bacteria. By sharing genes bacteria are able to spread antibiotic resistance among themselves. Therefore new drugs must continually be discovered.