When the immune system attacks the drug
A drug allergy is a hypersensitivity reaction: the immune system, not the drug's pharmacology, causes the harm. The first exposure usually does nothing — it just primes the immune system. On re-exposure the body overreacts. Because it is immune-driven, the reaction does not scale with dose: a trivial amount of penicillin can trigger full anaphylaxis in a sensitized person.
When your genes decide
An idiosyncratic reaction is a strange, individual response with no immune mechanism — often it traces to your genes. The field of pharmacogenomics studies how inherited differences change drug response. A common cause is a pharmacogenetic polymorphism: a gene variant that makes someone a slow or fast metabolizer of a drug, so a standard dose either piles up to toxic levels or fails entirely.
This is why modern practice sometimes tests genes before prescribing. Certain HLA gene variants flag people who will get a severe skin reaction to specific drugs; certain enzyme variants mean a normal codeine dose can either do nothing or, in ultra-rapid metabolizers, produce dangerous amounts of morphine. Idiosyncratic and allergic reactions are both Type B: rare, not dose-driven, and usually a reason to never use that drug again.
Harm before birth: teratogens
A teratogen is anything that causes a birth defect. Many drugs cross the placental barrier to reach the fetus, and the danger depends heavily on timing: the first trimester, when organs form, is the period of greatest risk. The thalidomide tragedy of the 1950s — a sedative that caused thousands of limb malformations — reshaped drug regulation worldwide and made pregnancy safety a permanent question in pharmacology.