In general, the food that triggers an allergic reaction in someone is called an allergen. In reality, it is the protein contained in that specific food wich is recognized by the immune system and triggers a reaction.
These allergenic proteins are normally very stable when exposed to heat (there are exceptions, to be discussed with an allergist), which explains why an allergen usually remains the same after cooking.
A food allergy is an excessive reaction of our immune system in presence of a specific food or food additive that is normally harmless for most people.
The immune system produces many substances which help to protect our bodies. Among these are antibodies, such as IgA, IgG and IgE... IgE antobodies are those that intervene in "immediate"-type allergic reactions, which are potentially anaphilactic (severe allergic reactions).
When these antibodies come into contact with the food allergen, they sometimes cause excessive secretion of a substance called histamine, which leads to inflammation and other allergic symptoms. The symptoms experienced will vary from one person to another, and from one allergen to another.
Source: L’Association Québécoise des Allergies Alimentaires