Scarlet Fever, Typhoid Fever, bacterial menningitis, diphtheria, anthrax, cholera .. all have a great history of treatment with homeopathy.
Treatment is not much different from any other homeopathic treatment, except that we have 200yrs of history informing us as to likely symptoms & likely Rx applicable to those symptoms.. to the extent where (for instance) there are 9 known Rx in Cholera, from which one (or a series of two or three, if/as symptoms change) is likely to treat any/every case.
Scarlet fever offered the first widespread success in homeoprophylaxis .. done by Hahnemann himself ! Very interesting reading.
What happens to the bacteria ? I suppose they find the food no longer tasty & become unable to reproduce .. for whatever reason they die off.
I detest the inaccurate concept which is too-often offered that homeopathy "stimulates" the "immune system" (have they ever dissected a body and identified an immune system?)
-but it would be likely accurate to think along the lines that the healing response to the remedy brings about "homeostasis" and in that condition the bacteria no longer has an easy host environment.
HOW in terms of biochemistry ? Dunno. Let us know what you discover !