>>12553553There are a lot of different ways that medicine works. Asking how they all generally work is futile, but I can give a couple of the major methods.
A drug will be a molecule that can enter cells and interact with proteins/large biomolecules to either increase or decrease their activity. This can have cascading effects throughout our biology that can be hard to trace and discern. This means a lot of modern drugs have a causal relationship that we exploit to get a specific effect ie. Antibiotics interfering with cell wall proteins in bacteria. This is then tested in humans to ensure that the molecule isn't promiscuous enough to modulate other systems and is capable of retaining the desired activity in the body.
Originally this came from people eating leaves and licking rocks and figuring out which worked okay sometimes. We slowly evolved our medicinal practices from that to current methods that are actually able to investigate the biochemical basis of medicine. Even then very complex things like neurology are difficult to predict and are based on metrics of "we know this molecule binds this sort of receptor that is over excited in people with this mental problem let's try it".
Biochemistry alone is generally a two semester course that takes significant effort to even get prepared to understand and you wanted a primer on everything past that. No way is anyone gonna be able to teach you all that in a 4chan thread