Most people with allergies make tiny molecules, called IgE antibodies, that are like tiny antennae that can tell when the food a person is allergic to enters the body. These antennae sit on cells called "mast cells", which appear throughout the body.
Mast cells are filled with chemicals. Some of those chemicals are histamine. When someone with a food allergy eats the food they are allergic to, the proteins of that food (the part of the food that causes the allergy) attach to the IgE on the mast cell.
This causes the mast cell to explode, sending chemicals throughout the body. The chemicals cause the symptoms of an allergic reaction.