Drug treatment remains a mainstay of medicine. In some situations a drug unexpectedly has no effect, or unforeseen serious side effects occur. For the patient this represents a dangerous and potentially life-threatening situation. It certainly is a distressing experience for the doctor. At the societal level, adverse drug reactions represent a leading cause of disease and death. Genetic variation often underlies these unexpected situations. Pharmacogenetics is the term used about genetically determined variability in the metabolism of drugs. Pharmacogenomics usually refers to drug discovery based on knowledge of genes, but it is a discipline that offers insight into aetiologic mechanisms, and possible prevention and treatment. There is a trend towards a definition of pharmacogenomics that includes both pharmacogenetics and pharmacogenomics as defined above. Our article is an introduction to pharmacogenomics, using the broader definition. Biotechnological methods cannot be understood without a grasp of basic medical genetics, and we provide a brush-up on the fundamentals. We then outline pharmacogenetics, giving examples of genetically based variation in drug metabolising enzymes, drug receptors and drug transporting proteins. Modern biotechnology would be unthinkable without the aid of computers, and we briefly touch upon the field of bioinformatics. Finally, we give an overview of pharmacogenomics in the narrower sense. The rapidly growing field of pharmacogenomics is going to influence our everyday practice of medicine in the immediate future.