Our immune system has evolved to protect us against potentially dangerous non-self particles. I have difficulty in understanding why there is a distinction called an allergic response: what’s wrong with using the term immune response full stop? Surely a person’s immune system should react to a particle of grass pollen in EXACTLY the same way as it does to a non-self protein expressed on cells of some transfused blood. The mystery that I absolutely don’t understand is why our body can then differentiate the scale of the response.
The trouble is, you can't live without being exposed to all sorts of non-self particles. Some of those particles signal an actual threat to your health (proteins associated with a disease causing virus), some are nearly harmless (bee stings), some are completely harmless (grass pollen or cat dander), and some are potentially valuable as part of a food substance (seafood or peanuts). Ideally you'd like your immune system to respond to the harmful ones, and ignore the harmless or useful ones. An allergy is defined as an unneccesary immune response to a harmless (or nearly harmless) substance.
You do want your immune system to deactivate venom from a bee sting, but you don't want it to react so strongly that as a side effect your throat swells up and you can't breathe. Most people breath in grass pollen every day of their live with no ill effects, so those folks who have an allergy to grass pollen are being made miserable by their immune system to no good purpose.
Ideally the immune system mounts a full response only when the presence of particular non-self particles is associated with other signals indicating that something "bad" is happening which merits an immune response. However, the process by which the immune system is regulated is incredibly complex, involving feedback loops from hundreds of different chemical pathways and dozens of different cell types. The process is imperfect. Sometimes it goes wrong, and the immune system mounts an aggressive response to a harmless foreign substance or even worse part of your own body.
Allergy is an exacerbated inflammatory reaction of the immune system in reaction to small quantities of foreign inert substances called allergens. It is a clinical condition characterized by its symptoms: redness of the eyes, ocular and nasal discharge, itching, eczema, asthma, headache, digestive disorders and swelling. The most critical clinical manifestation is the anaphylactic shock that may lead to death.
The immune reaction is triggered by pathogens (viruses, bacteria, parasites) that have the ability to replicate within the body.
Both the allergy and the normal immune reaction share the same principle: a primary immune response where the immune system learn about the antigen/allergen, and a secondary immune response where it can unleash its full potential (too much in the case of allergy).