How medicines work
Locks and keys, how a medicine’s level rises and falls in the body, a factory of pain signals, and bacteria versus viruses. Four ideas about why medicines work, using only made-up drugs.
This is a reading piece about a simplified teaching model of how medicines work. All drug names and numbers are fictional and do not describe how any real medicine acts, how much to take, how to take it, or what side effects it has. Do not use it to decide anything about your health or your medicines. Follow your doctor’s or pharmacist’s instructions and the package leaflet.
1. Locks and keys: receptors
Cells in your body carry receptors, proteins and similar molecules that work like switches. When a molecule of the right shape sticks to one, the cell reacts. The molecule can be one the body makes itself, or a medicine.
- Agonist: a molecule that sticks and flips the switch.
- Antagonist: a molecule that sticks but does not flip the switch, and gets in the way of the others.
A “competitive” antagonist sticks to the same place as the agonist, and can come off again. So if you add more agonist, it pushes the blocker aside and the reaction comes back.
This site’s program checked, with made-up molecules, that occupancy (the share of receptors that are taken) is concentration ÷ (concentration + Kd), that adding a blocker lowers the response, and that adding more of the natural substance brings it back (receptor-lock/engine.test.ts). Kd is a number where smaller means stickier.
The surprise is that how well it sticks and how well it flips the switch are two different things. Some blockers stick very well and flip nothing. The model on this site checks that too (same test).
In history, Paul Ehrlich and John Langley are said to have grown the idea of a receptor separately, in the early 1900s. So it would be wrong to say that Ehrlich discovered receptors. The “lock and key” picture comes from Emil Fischer in the 1890s, and was about an enzyme and its partner molecule, not about medicines. In 1958 the idea of “induced fit” followed: the shapes change a little as they meet. The lock is an easy way in, and the real thing is a bit softer.
2. Levels in the body: half-life
A medicine is absorbed, travels around, is changed, and leaves the body. As a result its level in the blood changes over time. Here we use the simplest view: the time for the level to fall by half is called the half-life, and the level keeps falling by the same share every half-life.
So after 1 half-life 50% is gone, after 2 it is 75%, after 3 87.5%, after 4 93.75%, and after 5 about 97% (96.875%). This site’s program checked these shares (half-life-dosing/engine.test.ts).
Some medicines do not fall off this simply; this is a simple model for seeing the idea.
If you take doses again and again, the level goes up and down but builds up, and then stops rising. This is called a steady state.
The usual rule of thumb is 4 to 5 half-lives to get there. It is a rounded guide, meaning about 94–97% of the steady level. The time depends on the half-life, not on the size of one dose.
This site’s program checked, for a made-up example (half-life 4 hours, interval 8 hours, one dose adds 20), that the peak is about 26.7 and the trough about 6.7, that 4–5 half-lives reach 94–97%, and that the time depends on the half-life and not the dose size (half-life-dosing/engine.test.ts).
It is said that there is a band of useful levels: above the level where an effect starts, below the level where harm starts. This is called the therapeutic window, and where its edges lie differs from person to person. The work shows how a missed or changed dose can push the graph below or above the band. That is only the shape of the model. What to actually do differs from medicine to medicine. Do not decide by yourself; ask the doctor or pharmacist who prescribed it.
3. How pain relievers work: stopping a factory
In the body, an enzyme called COX (cyclooxygenase) works like a factory that makes substances called prostaglandins. Prostaglandins are involved in inflammation, pain and fever. COX comes in kinds. COX-1 supports everyday jobs such as protecting the stomach lining. COX-2 increases when there is inflammation.
A group of pain relievers called NSAIDs blocks the entrance of this factory and so lowers prostaglandins. Pain and the like ease, but the same factory also makes the stomach-protecting substances, so those fall too.
This site’s program checked, with a fictional drug, that both the pain side and the protecting side fall as the drug increases, and that the two can move independently (pain-relief/engine.test.ts). The point to notice: the good effects and the unwanted ones come out of the same factory. Medicines differ a little in how they act on COX-1 and COX-2, but we give no numbers here.
In history, John Vane showed in 1971 that aspirin-like drugs work by getting in the way of prostaglandin production. In 1982 Vane shared the Nobel Prize in Physiology or Medicine with Sune Bergström and Bengt Samuelsson, for discoveries about prostaglandins and related substances. Aspirin itself had been used long before. 1971 is the year its way of working was understood, not the year it was made.
By the way, how acetaminophen (paracetamol) works in detail is still not clear. We cannot say it is the same as NSAIDs or different, and research goes on. So this work does not model it. If you are unsure how to use a medicine, including ones sold without a prescription, ask a pharmacist.
4. Antibiotics and viruses
Antibiotics work on infections caused by bacteria. Colds, most sore throats and flu are caused by viruses, and antibiotics neither cure them nor make them easier. This is what the CDC in the United States and the NHS in the United Kingdom explain.
One reason is the target. Penicillin-type medicines, for example, get in the way of the last step in which bacteria build their cell wall. Without a good wall, growing bacteria become weak and can burst. A virus has no cell wall, so there is nothing for this kind of drug to aim at.
This site’s program also checked that, with or without the fictional drug, the number of viruses does not change at all (antibiotics-viruses/engine.test.ts).
Medicines that do work on viruses (antivirals) aim at different things and are a different matter. And some drugs against bacteria aim at something other than the wall.
Another important idea is resistance. The WHO uses antimicrobial resistance for when bacteria and the like stop responding to medicines, making infections harder to treat. Among the main causes it lists the inappropriate and excessive use of these medicines.
What becomes resistant is the bacteria, not the person’s body. The idea is explained as selection, as in evolution: a bacterial population has, from the start, a few that are hard to treat. When the drug thins out the ones it works on, the hard-to-treat ones are left and increase.
This site’s program checked, over several random seeds, that after the drug the share of hard-to-treat bacteria rises, and that it does not without the drug (antibiotics-viruses/engine.test.ts).
How long should an antibiotic be taken, then? That depends on the illness and the medicine. The old saying “finish the course” is debated among experts, and this article says neither yes nor no. Follow the instructions of the doctor or pharmacist who prescribed it, and the package leaflet. Do not change the amount or the length by yourself, and do not stop on your own just because you feel better (Japan’s AMR Clinical Reference Center gives the same advice to the public).
In history, Alexander Fleming noticed in 1928 that a mould got in the way of bacteria growing. But turning it into a medicine that could treat people was done by later people, such as the team of Howard Florey and Ernst Chain. The 1945 Nobel Prize went to the three together. The one who found it and the ones who made it a medicine are best kept apart.
What they share
- A medicine works only where there is something to aim at: a receptor or a bacterial wall needs a partner that fits in shape and place.
- How well it works and how tightly it sticks are different: sticking well does not mean flipping the switch.
- Good and unwanted effects can come from the same mechanism: pain on one side, stomach protection on the other.
- Time and amount decide the outcome: levels build up with repeats and can leave the band above or below.
All four are simplified teaching models. The drug names and numbers here are all fictional. For real medicines, the instructions of your doctor or pharmacist and the package leaflet are what count.
Sources
- AMR臨床リファレンスセンター「抗菌薬の正しい使い方」
- University of Minnesota Open Textbook — Agonists and antagonists(受容体と作動薬・拮抗薬 / receptors, agonists, antagonists)
- History of the receptor concept(Ehrlich・Langley / 歴史論文 / history paper)
- Science History Institute — Paul Ehrlich
- StatPearls — Half-life(半減期と定常状態の目安 / half-life and steady-state rule of thumb)
- StatPearls — NSAIDs(COX とプロスタグランジン / COX and prostaglandins)
- Nobel Prize — John R. Vane, biographical
- StatPearls — Acetaminophen(作用機序は未解明 / mechanism still unclear)
- CDC — About antibiotic use
- NHS — Antibiotics
- WHO — Antimicrobial resistance (fact sheet)
- Penicillin: its discovery and early development(PubMed)
- Cogniq Fun — src/lib/games/receptor-lock/engine.test.ts(占有率 = c / (c + Kd)、拮抗薬を増やすと反応が下がり、作動薬を増やすと戻る / occupancy, blocker lowers response, more natural substance brings it back)
- Cogniq Fun — src/lib/games/half-life-dosing/engine.test.ts(半減期ごとの割合、定常状態の式、4〜5半減期で94〜97% / half-life shares, steady-state formula, 94–97% after 4–5 half-lives)
- Cogniq Fun — src/lib/games/pain-relief/engine.test.ts(薬を増やすと両方のプロスタグランジンが減る / both prostaglandin amounts fall as the drug increases)
- Cogniq Fun — src/lib/games/antibiotics-viruses/engine.test.ts(ウイルスは薬で変わらない、薬のあとは効きにくい細菌の割合が増える / virus untouched, hard-to-treat share rises after the drug)
Updated: 2026-10-18