That’s a really interesting question, and one that many scientists and doctors are also trying to understand better.
It all starts with the immune system. Every person has one – a group of cells, tissues and organs in the body that helps you fight infections.
It does this by fighting off bugs that might make you sick when they enter your body. This is very important both in keeping you well, as well as helping you recover when you do get sick with an infection.
Allergies happen when the immune system starts overreacting to other things which would not usually make you sick. These can include dust, pollens, pets, and as you mentioned, foods.
For example, in someone who is not allergic to cow’s milk, the immune system doesn’t react when they drink the milk.
But if you are allergic to cow’s milk, when you drink it your immune system overreacts and can cause you to have a rash, swelling or trouble breathing.
Passing down allergies
If there are people in your family with allergies, such as asthma, eczema, hay fever or food allergies, then you are more likely to have allergies too.
This means that allergies may be in the genes that are passed down from parents to children, just like there are genes that pass down the colour of your eyes and hair.
Some foods commonly cause allergies, such as cow’s milk, egg, wheat, nuts and shellfish.
It may be that the age when you first try these foods can affect whether you go on to become allergic to that food, and a lot of research is happening to figure out if that is true.
Over the next few years, I think we will understand this question better, and hopefully be able to make food allergies less common.