Image copyright Getty Images

As anyone who has ever eaten a really hot chilli will testify, they can cause a lot of pain.

Chillies come in many shapes, colours, sizes and strengths, but one thing they have in common is the burning sensation they cause in your mouth, eyes and any other part of your body into which their juices come into contact.

Although most people think that the hottest part of a chilli is its seeds, in fact it is the white spongy layer you find inside, called the placenta. Bite into this and you will really feel the burn.

That burning sensation is mainly caused by a chemical called capsaicin, which is found in tiny glands in the chilli's placenta.

When you eat a chilli, the capsaicin is released into your saliva and then binds on to TRPV1 receptors in your mouth and tongue.

The receptors are actually there to detect the sensation of scalding heat.

Capsaicin makes your mouth feel as if it is on fire because the capsaicin molecule happens to fit the receptors perfectly.

When this happens it triggers these receptors, which send a signal to your brain, fooling it into thinking that your mouth is literally burning.

Is the chilli pepper friend or foe?

Can you hurt yourself eating chilli peppers?

The reason why wild chilli plants first started to produce capsaicin was to try and protect themselves from being eaten by mammals like you.

From an evolutionary perspective the plant would much rather have its seeds dispersed far and wide by birds.

Oddly enough birds, unlike mammals, don't have TRPV1 receptors, so they do not experience any burn.

Humans messed things up

So producing capsaicin turned out to be the ideal way to deter mammals from eating the plant while encouraging birds to do so.

But then along came an ape with a giant frontal cortex who somehow learnt to love the burn.

Image copyright Getty Images Image caption Humans have learned to love the burn of chillies

Humans are not only not deterred by capsaicin, most of us positively love it. So what's going on?

The ferocity of a chilli pepper is measured in something called Scoville heat units (SHU).

A relatively mild chilli, like the Dutch Long chilli, is only 500, but by the time you move on to the Naga chilli, which is one of the hottest in the world, you are biting into something with a Scoville score of more than 1.3m units.

The current world record holder for hotness, however, is the Carolina Reaper, first bred in Rock Hill, South Carolina.

According to tests carried out by the University of Winthrop in South Carolina it scores an impressive 1.57m SHUs

So, what happens when you bite into a really hot chill? As part of the new BBC2 series The Secrets of Your Food, botanist James Wong and I entered a chilli eating competition.

Adrenaline release

Within minutes of eating my first chilli, my eyes began to water and my pulse shot up.

My body had responded to an initial burst of severe pain by releasing adrenaline.

This not only made my heart beat faster, but it also made my pupils dilate. Every round the chillies got hotter and both of us soon dropped out.

Had we been able to tolerate biting into some really hot chillies, it's possible we would have experienced a "chilli endorphin high".

Image copyright Getty Images Image caption Chilli seeds are dispersed by birds that eat them

Endorphins are natural opiates, painkillers which are sometimes released in response to the chilli's sting. Like opiates they are said to induce a pervasive sense of happiness.

It is a form of thrill-seeking - feeding our brains' desire for stimulation.

Although it is not something I have personally ever experienced, I have certainly heard it described by hard core chilli eaters..

But beyond the pain and the perverse pleasures, are there any health benefits to eating chillies? Perhaps.

In a recent study done by researchers from the University of Vermont they looked at data from more than 16,000 Americans who had filled in food questionnaires over an average of 18.9 years.

During that time nearly 5,000 of them had died. What they found was that those who ate a lot of red hot chillies were 13% less likely to die during that period than those who did not.

This supports the finding of another recent study, carried out in China, that came to similar conclusions.

So why might eating chillies be good for you?

The researchers speculate that it could be that capsaicin is helping increase blood flow, or even altering the mix of your gut bacteria in a helpful direction.

Whatever the reason, it adds to my pleasure as I sprinkle chilli on my omelette in the morning.

The Secrets of Your Food continues on BBC2 at 2100GMT on Friday 10th March .

Join the conversation on our Facebook page.