Penicillins are antibiotics that got their name from the Penicillium mold, from which they were originally extracted.
They belong to the pharmacological group of beta-lactam antibiotics.
What all beta-lactams have in common is a beta-lactam ring in their structure, which gives them their name, and also the mechanism of action - the inhibition of cell wall synthesis in bacteria.
So, our body consists of multiple eukaryotic cells, while bacterias are prokaryotic, meaning they are primitive, single cellular organisms.
Most have a slimy capsule made out of polysaccharides and a cell wall which encapsulates and protects the bacteria like a suit of armor and offers structural support.
Bacterial cell walls are made of a substance called peptidoglycan, or murein.
Peptidoglycan is a molecule composed out of long strands of amino polysaccharides running in parallel.
These are made of segments of N-acetylglucosamine, or NAG, and N-acetylmuramic acid, or NAM, in an alternating pattern - so, NAG, NAM, NAG, NAM, and so on, like a pearl necklace.
At the tips of the NAM subunits are tetrapeptide and pentapeptide chains, protruding from NAM subunits.
These peptide chains can link to other peptide chains from the neighboring strands through a process known as transpeptidation.
This is carried out by an enzyme called DD-transpeptidases, or penicillin binding proteins, or PBPs.
Now these enzymes are like locks and there are specific binding area for the pentapeptides keys to fit into.
Once the key goes in the lock, the PBP enzymes fuse them together, creating a stable link between the two amino polysaccharide strands and strengthen the cell wall.
In essence, all beta lactam antibiotics, like the penicillins, somewhat resemble the tetrapeptide chains.
Inside the bacteria, PBP enzymes will mistakenly bind to the beta lactams antibiotic molecule instead of a tetrapeptide and stick inside the PBP forever, like chewing gum in a keyhole, permanently disabling it.
As more and more of PBPs gets disabled, the crosslinking fails to occur, and the wall becomes weak and unstable.
If the affected bacteria attempts to divide, their cell wall will collapse, killing them in the process!
Now, some bacteria have developed resistance to beta lactam antibiotics.
The most notable is the notorious staphylococcus aureus, which evolved an enzyme called beta lactamases or penicillinases that breaks down the beta lactam ring within the antibiotic, rendering it ineffective.
In response, we started adding beta lactamase inhibitors, such as clavulanic acid, that would bind to beta lactamases and inactivate them, like the gum into the keyhole.