Antibiotics are medicines that fight bacterial infections by killing bacteria or stopping them from multiplying. They work by targeting structures that bacterial cells have but human cells don’t, which is why they can wipe out an infection without destroying your own tissue. They are among the most commonly prescribed medications in the world, but they only work against bacteria, not viruses.
How Antibiotics Attack Bacteria
Bacteria are living cells with their own machinery for building walls, copying DNA, and manufacturing proteins. Antibiotics exploit this by disrupting one or more of those essential processes. There are four main targets.
Cell wall construction. Bacteria are surrounded by a rigid wall that keeps them from bursting. Antibiotics like penicillin block the proteins that stitch this wall together. Without a functioning wall, the bacterial cell swells, loses its structural integrity, and ruptures.
Protein production. Bacteria build proteins using tiny internal machines called ribosomes. Several antibiotic classes latch onto these ribosomes and either halt production entirely or cause the ribosome to misread instructions, generating defective proteins the bacterium can’t use.
DNA copying. To reproduce, bacteria need to unwind and duplicate their DNA. Some antibiotics trap the enzymes responsible for this unwinding, stalling the replication machinery. The bacterium can no longer divide and eventually dies.
RNA synthesis. A smaller group of antibiotics blocks the step where DNA instructions are transcribed into RNA, cutting off the flow of genetic information the cell needs to function.
Bactericidal vs. Bacteriostatic
Antibiotics fall into two broad categories based on what they do to bacteria. Bactericidal antibiotics kill bacteria outright. This group includes penicillins and other beta-lactams, fluoroquinolones, and aminoglycosides. Bacteriostatic antibiotics don’t kill bacteria directly. Instead, they halt bacterial growth, giving your immune system time to clear the infection. Tetracyclines, macrolides (like erythromycin), and sulfonamides work this way.
In practice, the distinction matters less than it might seem. A bacteriostatic drug paired with a healthy immune system clears most infections just as effectively as a bactericidal one. The choice depends more on the type of infection, the specific bacterium involved, and how your body is responding.
Broad-Spectrum vs. Narrow-Spectrum
Some antibiotics target a wide range of bacterial species. These are called broad-spectrum antibiotics. Others are designed to hit only a small group of bacteria and are considered narrow-spectrum. When a doctor knows exactly which bacterium is causing your infection, a narrow-spectrum drug is typically the better choice. It does the job while leaving more of your beneficial bacteria intact.
Broad-spectrum antibiotics are useful when the infection is severe and there isn’t time to wait for lab results identifying the exact culprit. But they come with trade-offs. Because they kill a wider swath of bacteria, they’re more likely to disrupt your gut microbiome, cause side effects, and contribute to resistance. Research from Children’s Hospital of Philadelphia found that patients who received narrow-spectrum antibiotics had fewer side effects and better overall quality of life compared to those given broad-spectrum drugs for the same conditions.
Why They Don’t Work on Viruses
Viruses and bacteria are fundamentally different. Bacteria are complete, self-sustaining cells with walls, ribosomes, and DNA-copying machinery. Viruses are not cells at all. They’re tiny packets of genetic material that hijack your own cells to reproduce. Since viruses lack cell walls, ribosomes, and the other structures antibiotics target, antibiotics have nothing to attack. Taking an antibiotic for a cold, the flu, or most sore throats won’t speed recovery. It will, however, expose your body’s bacteria to the drug unnecessarily, raising the risk of resistance and side effects.
Common Side Effects
The most frequent side effects are gastrointestinal: nausea, vomiting, diarrhea, abdominal pain, bloating, and loss of appetite. These happen because antibiotics don’t distinguish between the harmful bacteria causing your infection and the beneficial bacteria living in your gut. Allergic reactions, ranging from mild rashes to more serious responses, are another well-known risk. With amoxicillin, for example, rashes occur in 5% to 10% of patients. Clindamycin causes diarrhea in 12% to 14% of people who take it.
One side effect worth knowing about is infection with a bacterium called C. difficile, which can flourish when antibiotics wipe out competing gut bacteria. Clindamycin carries the highest risk, roughly 30 times the baseline rate. Third-generation cephalosporins and amoxicillin combined with clavulanate raise the risk by about 15 times. Even lower-risk antibiotics like ciprofloxacin increase C. difficile risk eightfold. Symptoms include watery diarrhea, fever, and abdominal cramping, and the infection sometimes requires its own course of treatment.
Impact on Gut Bacteria
Your gut contains trillions of bacteria that aid digestion, produce vitamins, and train your immune system. A course of antibiotics can dramatically shift this community. In studies tracking gut bacteria during antibiotic treatment, the total count of certain bacterial populations dropped by 100- to 1,000-fold within the first day. Most of these populations bounced back within a few days of treatment, showing remarkable resilience.
However, the recovery isn’t always complete. While the overall bacterial load may return to normal relatively quickly, the diversity of species often settles at a lower level than before treatment. In one study, the variety of certain gut bacteria permanently decreased by 36% to 70% after a standard five-day course, depending on which antibiotic was used. This is one reason doctors increasingly emphasize using antibiotics only when they’re genuinely needed, and choosing narrow-spectrum options whenever possible.
How Bacteria Become Resistant
Antibiotic resistance happens when bacteria evolve ways to survive the drugs designed to kill them. This is now one of the most serious threats to global public health. The WHO’s surveillance system tracked more than 23 million confirmed infections across 110 countries between 2016 and 2023, and resistance rates continue to climb for many common bacteria.
Bacteria use four main strategies to resist antibiotics:
- Changing the target. Bacteria can alter the very structures antibiotics are designed to latch onto. If the drug can’t bind to its target, it can’t do its job. MRSA, for instance, modifies the proteins in its cell wall so that penicillin-type drugs no longer recognize them.
- Destroying the drug. Some bacteria produce enzymes that break down antibiotics before they can act. The most common example is beta-lactamase, an enzyme that chews through penicillins and related drugs.
- Pumping the drug out. Bacteria can activate molecular pumps in their cell membranes that actively expel antibiotics before they reach a lethal concentration inside the cell.
- Blocking entry. Bacteria can reduce the number or size of pores in their outer membrane, making it harder for antibiotic molecules to get inside in the first place.
These resistance traits can be passed between bacteria, even between different species, meaning one resistant bacterium can share its defenses with neighbors. Every unnecessary course of antibiotics gives bacteria more opportunities to develop and spread these survival mechanisms. Using antibiotics only when prescribed for a confirmed bacterial infection, finishing the full course, and never sharing leftover pills are the most practical steps you can take to slow this process.

