Antibiotics work by killing bacteria and preventing them from multiplying. Common antibiotics include gentamicin, cephalexin, ertapenem, erythromycin, ciprofloxacin, and metronidazole.

They include a range of powerful drugs used to treat diseases caused by bacteria.

Antibiotics cannot treat viral infections, such as cold, flu, and most coughs.

This article explains what antibiotics are, how they work, potential side effects, and antibiotic resistance.

Fast facts on antibiotics

  • Alexander Fleming discovered penicillin, the first natural antibiotic, in 1928.
  • Antibiotics cannot fight viral infections.
  • Fleming predicted the rise of antibiotic resistance.
  • Antibiotics either kill or slow the growth of bacteria.
  • Side effects can include diarrhea, an upset stomach, and nausea.
Share on Pinterest
Guido Mieth/Getty Images

Antibiotics are powerful medications that treat certain infections and can save lives when used properly. They either stop bacteria from reproducing or destroy them.

Before bacteria can multiply and cause symptoms, the immune system can typically kill them. White blood cells (WBCs) attack harmful bacteria — even if symptoms occur, the immune system can usually cope and fend off the infection.

However, sometimes the number of harmful bacteria is excessive, and the immune system cannot clear them all. Antibiotics are useful in this scenario.

The first antibiotic was penicillin. Penicillin-based antibiotics, such as ampicillin, amoxicillin, and penicillin G, are still available to treat a variety of infections and have been in use for many years.

Several types of modern antibiotics are available, and they are usually only available with a prescription in the United States. Topical antibiotics are available in over-the-counter (OTC) creams and ointments.

There are different types of antibiotics, which work in their unique way. However, the two main they work include:

  • A bactericidal antibiotic, such as penicillin, kills the bacteria. These drugs usually interfere with either the formation of the bacterial cell wall or its cell contents.
  • A bacteriostatic stops bacteria from multiplying.

It may take a few hours or days after taking the first dose before people feel better or their symptoms improve.

There are various classes or groups of antibiotics, which depend on their chemical structure. Some classes of antibiotics include the following:

ClassExamples
Penicillinsamoxicillin (Amoxil)
Macrolidesazithromycin (Zithromax) and erythromycin (Ery-Tab)
Cephalosporinscephalexin (Keflex) and cefdinir (Omnicef)
Fluoroquinolonesciprofloxacin (Cipro) and levofloxacin (Levaquin)
Beta-lactams with increased activityamoxicillin/clavulanate (Augmentin)
Urinary anti-infectivesnitrofurantoin (Macrobid)
Lincosamidesclindamycin (Cleocin)
Tetracyclinesminocycline, rolitetracycline, and doxycycline
Sulfonamidessulfamethoxazole (Bactrim, Septra, Sulfatrim)
Glycopeptidesvancomycin (Firvanq), teicoplanin (Targocid), telavancin (Vibativ), ramoplanin
Aminoglycosidesgentamicin (Garamycin), amikacin (Arikase), tobramycin (Tobrasol), neomycin (Neosporin), and streptomycin (Agrimysin-17)

This list is not inclusive — other classes and brand names exist. In addition, penicillins, cephalosporins, and other antibiotics may be regarded as subclasses of beta-lactam drugs.

Experts advise using antibiotics only when they are needed. This is to ensure that the bacteria is killed and is unable to multiply and spread to other parts of the body.

Also, antibiotic use can sometimes be associated with side effects and antibiotic resistance.

Antibiotic resistance occurs when germs no longer respond to the antibiotic designed to kill them. Inappropriate prescription of antibiotics is driving up the incidence of antibiotic resistance.

Sometimes prescriptions of the wrong medication — or the wrong dosage — can lead to antibiotic misuse. Misuse can also occur when people do not take antibiotics as their doctor prescribes. Some measures people can take include finishing the treatment course and not sharing antibiotic medications with others— even if they have the same symptoms.

The Centers for Disease Control and Prevention (CDC) state that in the United States, around 47 million antibiotic courses are inappropriately prescribed to people, meaning their illness did not require antibiotics.

Some bacteria — such as Enterobacterales — can become resistant to carbapenems, a major class of last-line antibiotics. Enterobacterales are an order of bacteria that can cause pneumonia, meningitis, and other diseases. Escherichia coli (E.coli) is an example of an Enterobacterale.

CRE, or carbapenem-resistant Enterobacterales, pose a major concern to people in hospitals and other healthcare settings.

Experts believe that carbapenem resistance may lead to:

  • a greater incidence of disease
  • a reduction in the effectiveness of initial antibiotic therapy
  • poorer outcomes

In his Nobel Prize acceptance speech in 1945, Alexander Fleming said:

“Then there is the danger that the ignorant man may easily underdose himself and by exposing his microbes to non-lethal quantities of the drug, make them resistant.”

As the man who discovered the first antibiotic predicted, drug resistance is starting to become commonplace.

Antibiotic resistance is now considered one of the greatest public health challenges.

A doctor prescribes antibiotics for the treatment of a bacterial infection. It is not effective against viruses.

Knowing whether an infection is bacterial or viral helps to treat it effectively.

Viruses cause most upper respiratory tract infections, such as the common cold and flu. Antibiotics do not work against these viruses.

If people overuse antibiotics or use them incorrectly, the bacteria might become resistant. This means that the antibiotic becomes less effective against that type of bacterium, as the bacterium has been able to improve its defenses.

A doctor can prescribe a broad-spectrum antibiotic to treat a wide range of infections. A narrow-spectrum antibiotic is only effective against a few types of bacteria.

Some antibiotics attack aerobic bacteria, while others work against anaerobic bacteria. Aerobic bacteria need oxygen, and anaerobic bacteria do not.

In some cases, a healthcare professional may provide antibiotics to prevent — rather than treat — infection, as might be the case before surgery. This is the “prophylactic” use of antibiotics. People commonly use these antibiotics before bowel and orthopedic surgery.

Antibiotics commonly cause the following side effects:

  • diarrhea
  • nausea
  • vomiting
  • rash
  • upset stomach
  • sensitivity to sunlight, when taking tetracyclines
  • with certain antibiotics or prolonged use, fungal infections of the mouth, digestive tract, and vagina

Some unusual side effects of antibiotics include:

  • low platelet count, when taking cephalosporins, and penicillins, among others
  • severe aches and pains, when taking fluoroquinolones
  • hearing loss, when taking macrolides or aminoglycosides
  • low granulocyte — a type of WBC — count, when taking penicillin
  • formation of kidney stones, when taking sulfonamides

Some people — especially older adults — may develop C.difficile infection. They may experience bowel inflammation, which can lead to severe, bloody diarrhea.

Learn more about the side effects of antibiotics.

Some people may develop an allergic reaction to antibiotics, especially penicillin. Side effects might include:

Allergic reactions to antibiotics might be immediate or delayed. This means that a person may experience adverse effects of the drug within an hour or within weeks.

Anyone who has an allergic reaction to an antibiotic must tell their doctor or pharmacist. While rare, people may experience a serious and sometimes fatal reaction to an antibiotic. They are called anaphylactic reactions.

Anaphylaxis: Symptoms and what to do

Anaphylaxis is a severe allergic reaction that can be life threatening. The symptoms develop suddenly and include:

  • hives
  • swelling of the face or mouth
  • wheezing
  • fast, shallow breathing
  • a fast heart rate
  • clammy skin
  • anxiety or confusion
  • dizziness
  • vomiting
  • blue or white lips
  • fainting or loss of consciousness

If someone has these symptoms:

  1. Check whether they are carrying an epinephrine pen. If they are, follow the instructions on the side of the pen to use it.
  2. Dial 911 or the number of the nearest emergency department.
  3. Lay the person down from a standing position. If they have vomited, turn them onto their side.
  4. Stay with them until the emergency services arrive.

Some people may need more than one epinephrine injection. If the symptoms do not improve in 5–15 minutes, or they come back, use a second pen if the person has one.

People with reduced liver or kidney function should be cautious when using antibiotics. This may affect the types of antibiotics they can use or the dose they receive.

Likewise, people who are pregnant or nursing should speak with a doctor about the best antibiotics to take.

Learn more about penicillin allergy.

Individuals taking an antibiotic should not take other medicines or herbal remedies without speaking with a doctor first. Certain OTC medicines might also interact with antibiotics.

Some doctors suggest that antibiotics can reduce the effectiveness of oral contraceptives. However, research does not generally support this.

Nonetheless, people who experience diarrhea and vomiting or are not taking their oral contraceptive during illness due to an upset stomach might find that its effectiveness reduces.

In these circumstances, doctors may recommend people take additional contraceptive precautions.

Doctors may also advise avoiding alcohol for certain drugs, such as doxycycline. However, drinking alcohol in moderation is unlikely to cause problems with the most commonly used antibiotics.

People usually take antibiotics by mouth. However, doctors can administer them by injection or apply them directly to the part of the body with infection.

Most antibiotics can start working within a few hours. Doctors advise people to complete the whole course of medication to prevent the return of the infection.

Stopping the medication before the course has finished increases the risk that the bacteria will become resistant to future treatments. The ones that survive will have had some exposure to the antibiotic and may consequently develop resistance to it.

An individual needs to complete the course of antibiotic treatment even after they notice an improvement in symptoms.

Doctors and the leaflet provided with the drug provide specific instructions on how to take the medication correctly.

People can follow some tips for using antibiotics effectively, such as:

  • Avoiding alcohol when using metronidazole.
  • Avoiding dairy products when taking tetracyclines, as these might disrupt the absorption of the medication.
  • Taking the medication at the same time, or at set times in the day — this depends on how many times a day a person needs to take the drug.

Here are some frequently asked questions about antibiotics.

What are the 10 most common antibiotics?

Here are ten examples of common antibiotic types:

  • aminoglycosides
  • cephalosporins
  • penicillins
  • monobactams
  • carbapenems
  • fluoroquinolones
  • macrolides
  • sulfonamides
  • tetracyclines
  • trimethoprim

How quickly do antibiotics work?

How quickly antibiotics work can differ for each individual, and may depend on the type and severity of infection. A typical course of antibiotics lasts between 5 and 14 days.

What should a person avoid while on antibiotics?

A person will typically need to avoid drinking alcohol when taking antibiotics. Some medications, such as the contraceptive pill, may also interact with antibiotics. A person’s doctor can advise on what a person should avoid during antibiotic treatment.

What happens if you take antibiotics too close together?

If a person takes two doses of antibiotics too close together, there may be an increased risk of side effects. These can include symptoms such as diarrhea and stomach pain. Following the instructions on the prescription can help to reduce the risk of side effects in some people.

Is it bad to take antibiotics a few times a year?

A person should only take antibiotics when they need them and when their doctor prescribes them. If a person needs to take antibiotics regularly, their doctor may look at other treatment options or take steps to identify what is causing frequent infections.