In 1928, Alexander Fleming found a contaminated Petri dish. Staphylococcus bacteria had been growing on the dish, and the lid had been left off. A mold called Penicillium notatum had also started growing on the dish; around it was a clear ring where no bacteria could grow. Thus began humanity's use of antibiotics.
There are now several drugs in penicillin's class. They work by disrupting the integrity of the bacterial cell wall, which is required for the bacterium to live. Molecules called peptidoglycans are an integral part of that wall, and penicillin stops peptidoglycans from linking together. Learn more about penicillins from the video.
Source: American Chemical Society