Generally a good place to begin is by looking at the cells/disease you’re wanting to treat. Technology allows us to map these structures so you can model an ideal for what might interact with it best. If there are parts of the receptor that would need a certain structure to interact with them it enables you to know that that is a good starting point for development.
From there, you just modify that core structure – changing parts of it to things that are nearly the same chemically but might interact differently to either improve or inhibit the responst.
Whilst we call the process of finding a new drug “drug discovery” it is more like engineering than a treasure hunt. First, we need to understand what is going wrong in our bodies that results in us getting ill. If you imagine the London Underground – it is a complex network of trains, signals and stations – and most of the time it works well. But when it breaks, there is chaos until the cause is understood and repaired.
Each cell in your body is similar – only the network is much more complicated and, (since we didn’t build it ourselves) when it goes wrong we often don’t know why. Biologists spend years trying to tease apart and understand the network, so they can trace the fault that is causing the disease. This “fault” is often an protein (an enzyme or receptor) or sometimes a piece of DNA or RNA that has gone wrong. We call this a “target” – and if we “hit” our “target” we cure the disease.
It is the job of chemists like me to find a molecule that hits our target. We often start by “screening”. Screening means testing a lot of compounds against your target enzyme in a test-tube (in fact we use 384 tiny test-tubes, called well plates, you can see a picture on my profile).
There are two different types of “screening” commonly employed. One uses a large set (>100,000) of compounds of around 300 g/mol of molecular weight. The other uses a smaller set (<2,000) of smaller molecules, termed "fragments" that weigh around 150 g/mol.
Another technique towards drug discovery is to use natural compounds from plants. Compare for example the structure of morphine (a nautral compound) to the more potent opioid activator (agonist) N-Phenethylnormorphine or the potent opioid inactivators (antagonists) naloxone and naltrexone.
You can also use hormones of the body as a starting point. For example, the asthma drug Ventolin (salbutamol) acts on adrenaline receptors in the muscle of the lungs and is clearly structurally similar to adrenaline itself, the natural (endogenous) substance.
All the techniques have strengths and weakness, but what happens after the screen is the same – any compounds that seem to work are optimised systematically by the chemists. This “design” process is the hardest to explain. Essentially it’s a bit like playing with Lego – we add or remove bits of the molecule and test to see what effect this has on the properties (activity, toxicity, solubility etc.). We bring together information from many similar molecules (called analogues) into a “structure-activity relationship” (SAR). We study the SAR for trends that help us to understand what to do next with our Lego! We can add to our understanding by using computational models or real pictures (generated by X-ray) or our molecules hitting our target.
Sorry that this is a long winded answer, but since drug discovery takes 15 years and massive teams of scientists, it's not surprising it can't be neatly explained in a sentence.