The development of any new pharmaceutical is a complex and expensive project. In many instances, the research divisions within pharmaceutical companies spend years studying aspects of the biology and biochemistry of the disease in question (malaria, cancer or bacterial infections, for example) in an effort to develop an approach to attack the disease. Once the biology of the disease is understood and an assay or animal model is in place, medicinal chemists begin to prepare potential chemical inhibitors. From initial results in the biological system, the chemists then prepare new, and hopefully improved, lead compounds. This sort of teamwork between the chemists and biologists often takes years before a final group of lead compounds is ready for more significant evaluation. At this point, a candidate drug is evaluated for toxicity, efficacy and other properties in an animal model (rats or dogs, for instance). This evaluation process may last years. Assuming that the drug candidate is successful in these tests, it then enters into Phase 1, Phase 2 and, finally, Phase 3 clinical trials in humans. The FDA establishes the number of patients required for each phase of the clinical trials according to guidelines based on the disease being treated. For example, a drug candidate for a disease that afflicts only 10,000 people would have a smaller number of patients in its trials than would a potential drug to fight a disease that afflicts millions such as high blood pressure. At the end of the clinical trials the company presents its data to the FDA, which then decides whether or not to approve the drug for sale to the public.
On average, the cost of developing a new drug is now well in excess of $1 billion and takes more than 10 years. (Again there is a wide discrepancy between estimates of the actual cost and time required, but I have attempted to provide an unbiased estimate using a variety of sources.) Because patents are typically granted during the initial research phase of investigation, a company developing a new drug usually has 10 years of patent protection (at the maximum except in rare cases of "orphan diseases") during which the drug is on the market. Thus, the higher prices of brand-name prescription drugs arise because companies have to recoup their investment during the lifetime of the patent, typically seven to 10 years, as well as make a profit on the sale.
This response represents a simplified case study and there are many examples of drug development that do not fit this profile precisely. For some brand-name drugs the developmental time frame is shortened somewhat, but there are many others in which it can last much longer.