What causes medication allergies in certain individuals?

What causes medication allergies in certain individuals?