For more specific the way how we change to resist against antibiotics, I tell you some more...
...we can increase our population ...
...by multiply our selves,
...or we can mate to have babies...
Especially, our next generations, whose genetic characteristics are derived from the parental organisms, have DNA mix randomly , by meoisis , that lead to the variation of species.
Mutation, the change of the gene that mistake while they copy, sometimes happen.
Nature acts the role select those who can adapt to it.
we called it NATURAL SELECTION
Also, competition for limited resources, such as food, spaces and mates coule be one of the conditions of natural selection.
Another conditions of natural selection is the increasing and survival in “best fit” organisms in environment
for example, when you change the environment that I live in by flooding the environment with medicine, who that have the variation to be resistant, survive and multiply all over again or mate to increase the population