Drug allergies occur when your immune system mistakes a drug for a harmful substance. Prescription or over-the-counter drugs may cause allergic reactions.