Allow me to elaborate a bit on Redjoker's (excellent) response The reaction underlying an allergy response is an immune response aimed at multicellular organisms (such as Helminths etc.) and large structurees created by microorganisms such as biofilms where the normal IgG mediated respons isn't enough to destroy them. (The basics of this response are already outlined in RedJoker's post) As such, the allergy response is the most destructive immune reaction present in the body (this also gives it interesting properties since surrounding tissue will try to restrict this destructive reaction in order to prevent collateral damage) The problem lies in the fact that this specific IgE respons exists alongside the standard immune response on bacteria, the IgG response. An allergy is basically caused when a foreign compound evokes an IgE mediated response, onstead of the standard immune response. While research is still ongoing on the cause of this "abnormal" response, it remains difficult to determine the exact nature of this unexpected immune reaction.