An allergy is something which triggers an allergic reaction. This is the immune system defending the body against attack by bacteria and viruses.
Having an allergy is when a thing (called an allergen) cannot enter the body without them getting sick. Sometimes the system goes wrong, and is triggered by some normal food, or flares up when the family pet comes into the room. This is what the ordinary person calls an 'allergy'.