If the protein target of a disease is known and that target has an available 3D structure, researchers will commonly design drugs against that protein using structure-based drug design (SBDD). In essence, SBDD uses the 3D shape and structure of the protein as the basis for designing new drugs. For instance, like magnets, if there was a positively charged region of the protein binding site, it would be good to have a negatively charged area of a ligand that could interact with that region.
Not every discovery project has an available 3D structure of the protein target. In this case, researchers could flip the script and look at ligands that are known to bind to the target of interest and then try to learn from this data how to design even better ligands that might become drugs, a process known as ligand-based drug design (LBDD). This is similar to trying to come up with a way to determine what will make a certain kind of car popular. This could be based on properties that make any given car popular, as well as taking into account what cars have been popular in the past, the target audience, and impacts of newer car technologies. Some attributes can more easily be predicted, such as comfortable seats and safety features. Other attributes, such as what a particular target audience would like and how new technologies will impact car design, are more difficult to predict.
LBDD and SBDD techniques can complement each other to take on the complex drug design process. In fact, if researchers have a 3D structure of a protein target as well as one or more known drugs (ligands) for that target, they can tackle the problem from both sides. It is useful to note that SBDD and LBDD computational techniques vary in both the speed of how quickly the calculation runs as well as the scientific rigor of the calculation. Researchers often deploy different techniques at different stages of a project to maximize efficiency.