An allergy occurs when the immune system reacts strongly to harmless substances like pollen, dust, or certain foods.