Resistance to antibiotics is often described as if a person becomes resistant, which misplaces where the change happens. The bacteria change, and they move between people carrying that change with them.
Selection does the work, not adaptation
A population of bacteria contains enormous variation, and a few individuals in it will already tolerate a given drug better than the rest, purely by chance.
An antibiotic removes the susceptible majority. The tolerant minority survives, and with the competition gone it has room and resources to multiply.
Nothing in that sequence requires the bacteria to sense the drug or respond to it. The drug simply decides which existing variants inherit the space, which is why exposure and resistance are so tightly linked.
Resistance genes move sideways
Bacteria pass genetic material to each other directly, including between different species, rather than only to their own descendants.
This means a resistance gene that emerged in a harmless gut organism can end up in one that causes disease, without either lineage having been exposed to the drug in a patient.
Several such genes often travel together on the same mobile element, which is why an organism can acquire resistance to a group of unrelated drugs in a single step.
Carriage is silent
Most resistant bacteria live on and in people who are perfectly well, particularly in the gut, on skin and in the nose.
Those people transmit them the same way any bacteria are transmitted, through hands, surfaces, food and close contact, with no illness to signal what is being passed on.
Because carriage is invisible, the spread of a resistant strain through a community is usually recognised only later, when infections that were once straightforward stop responding.
Hospitals concentrate the problem
Hospitals combine three conditions that favour resistant organisms: heavy antibiotic use, patients whose defences are already weakened, and devices that bypass the skin.
Catheters, drips and ventilators give bacteria a route past barriers that would otherwise stop them, so an organism carried harmlessly on skin becomes an infection.
Infection control measures exist to break the transmission link rather than to kill the organisms, which is why hand hygiene and isolation carry as much weight as prescribing policy.
Agriculture and travel widen the pool
Antibiotics are used in food production in many countries, and resistant bacteria selected there reach people through food, water and direct contact with animals.
Movement of people and goods then mixes regional bacterial populations, so a strain established in one part of the world appears elsewhere within a comparatively short period.
Containment therefore depends on measures taken far outside clinical medicine, and decisions about treatment for any individual belong with a clinician who knows the case.