If you ask people what makes them laugh, they tend to say jokes. But laughter is a highly social activity – the neuroscientist Robert Provine has found that people laugh most in conversation, and we are around 30 times more likely to laugh at something if we are with other people. We laugh more if we like people, or if we want them to like us.

Despite Friedrich Nietzsche's suggestion that man invented laughter because of (his) deep suffering, it turns out that laughter is not only common to all humans, but it is found in other mammals too, from gorillas to rats. This week we are exploring laughter at the Summer Science Exhibition, from sound to breath to brain with the help of stand-up comedians, and hopefully a lot of laughter.

As part of our work, we've been looking at the difference between laughter that is spontaneously produced, sometimes against your will, versus deliberate, posed laughter. We've been putting people into an anechoic chamber and doing whatever it takes to make them laugh, then asking them to produce posed laughter. We've found that people are extremely good at telling these different laughs apart, probably because of some of the unmistakable hallmarks of genuine laughter (there's a famous example here).

When we play real and posed laughs to people while scanning their brains with fMRI, we find that there is more activation to the posed laughs than to the real laughs, in brain areas associated with "mentalising" tasks, such as trying to work out what someone else is thinking. We realised that real laughter was much less ambiguous than posed laughter – if someone is really laughing hard, it easy to understand what they are doing.

But a posed laugh indicates that there is a reason someone is laughing, above and beyond helpless mirth. As humans, we want to know why they are laughing, as it is such an important social emotion. When we laugh with our friends, we are indicating that we are amused, but also that we like or love the people we are with, that we are affiliated with them, that we have a bond with them. Posed laughter may sound fake out of context, but in context we perceive it to be the warm, positive emotional act that it is.

Context is all. I was recently the butt of a joke on Ipswich railway station, when some teenage boys tapped me on the shoulder and ran away. I know, I know, total LOLs. They were helpless with mirth, but I found their laughter awful and appalling and I'd have been perfectly happy, at that exact moment, if they had all fallen into a ditch full of nettles. Their laughter was real, but I was not included in it, and it was horrible.

Victor Borge described laughter as the shortest distance between two people. We actively use it to close those distances, to make and maintain social bonds. And when we do this, we are using a truly evolutionary ancient behaviour. In other words, when it comes to laughter, we ain't nothing but mammals.

• Follow Comment is free on Twitter @commentisfree