Cocaine's a funny drug, isn't it? I can't think of any other substance – bar maybe alcohol – with the power to turn a relatively nice, normal human being into an absolute fucking nightmare. "Yeah, yeah, haha – have a bitta that," your friend Grant is screaming, trying to ram the neck of a Polish brandy bottle physically inside your throat. "Haha," he's going, completely out of character, four lines deep now. "Probably going to kill him dead, that! Haha. Good fucking banter. Shall we do another bump? Let's do another bump!! Have I told you about my idea for a board game??"

Of course, not everyone turns into a big sentient clenched jaw after half a gram – lots of us can do cocaine without becoming self-obsessed or arrogant or devoid of all self-awareness. But some of us can't, which is where the "cocaine dickhead" archetype comes from. The girl who won't stop banging on about her screenplay; the guy who wouldn't be able to gauge the vibe of the room (extremely anti-him) if it was written in spray-paint on the wall.

So why, exactly, does this happen? And how come it only affects some people and not others?

"Cocaine tends to make people go into themselves, so they can either become introverted or be very sociable but a bit dominant or self-involved," says Katy Mcleod, director of Chill Welfare, a social enterprise that runs welfare tents at festivals across the country. "One big issue with coke is how it makes you feel in yourself and how you come across to others when under the influence. The two don't always match up. You might think you're being really witty and outgoing, when other people just think you're a twat."

To get to the root of the twat chemistry, I spoke to David Belin from the Department of Pharmacology at Cambridge University. "Drugs target three psychological mechanisms in your brain," he said. With cocaine, you're effectively buzzing off the chemical dopamine flooding your brain every time you take a bump. "Dopamine is not pleasure itself, but a mechanism in the brain that allows for learning," David explained.

Imagine how a new guitarist might get a kick out of nailing "Smells Like Teen Spirt" for the first time, but then immediately crave that feeling again so move straight on to "Heart-Shaped Box". There's a buzz there. You're focused. The world's a bit more thrilling. Cocaine replicates that feeling far more vividly. "It targets your brain so that dopamine is released all the time that you take it, and it feels great," says David. "You start building a very strong motivation for the drugs."

From here to the second psychological dust storm cocaine kicks up between your ears. "Cocaine influences your pre-frontal cortex [the part of your brain that regulates behaviours and, essentially, your ability to make sound judgements]. It actually messes up your executive functions, your inhibitory control and your decision making. So now you've got this very strong motivation [from the dopamine] and, because of the effects of the drug, you end up with an inability to inhibit your impulses and make good decisions."

Remember the time you repeatedly offered the girl at that party a fiver for a line and she said yes, but only after making you promise you'd leave her alone forever? That. A study at Maastricht University in the Netherlands found that a single dose of coke – so a bump, or a tiny, little line – can impair your ability to recognise negative emotions in other people, which is why you're under the impression everyone is eternally interested in what you have to say, when, really, they are not.

"Third: drugs facilitate habits, so at this point your impulses are full of motivation for the drug, and they reach your habit system and you just do it without thinking about it, necessarily," said David, referring to how moreish cocaine can be. "Also, with cocaine, there's no real physical withdrawal, but there's a strong psychological withdrawal. You feel anxious, you feel bad, so that adds to the motivation to continue taking the drug."

So that would explain why people might tease out the dregs of a bag towards the end of the night, or put the call in to Albanian Rocky at the same time you'd usually be waking up?

"Absolutely," says David, adding that all these urges are going to be further enhanced or inhibited by the likely addition of alcohol to the mix. The combination effectively creates a new potent drug – cocaethylene – when the two meet in the liver, which drastically increases your chance of a heart attack, even up to 12 hours after you've been mixing. Woohoo!

"It will lower your general inhibitory tone so you give in to impulses you wouldn't normally," says David. Oh, and also, that thing where you're a few drinks ahead of everyone else and start muttering about getting some gear to "sober yourself up"? It's a myth. The cocaine is just providing more dopamine to battle between the other neurotransmitters competing for dominance in your brain. It might momentarily sharpen your focus, but in effect you're only more stimulated.

The final thing I'm interested to hear about is why so many people tend to get turned on when they're on coke, even if, in the case of some guys, there might structural problems to contend with.

"It may have have to do with general arousal," he said. "Unlike heroin, which focuses on pleasure by itself, cocaine makes the world shinier. So something that is beautiful – a partner or a potential partner – will become more beautiful, and you will want them more. Perhaps you don't have a choice."

The issue of choice, or lack thereof, has been something that David's alluded to throughout. If you've never taken drugs, you might be reading this and thinking, 'If it's such a problem, just don't do any coke." Which is fair. But is there a point where a so-called recreational user should maybe give their intake some proper consideration?

"Say you did it once at a party with friends and enjoyed it," says David. "Then, two months later, it's there again, but instead of being every two months it might gradually become every Saturday, and you think, 'I'm fine, because it's only Saturdays.' Do you really want it, or do you end up in this mood with friends and take it without really wanting it? If it's the latter, it suggests you are losing control. It's a reflex. It's the moment, the mindset. And the triggers – meeting with certain friends, drinking alcohol – for the drug mean you are always finding justifications. I suggest you meet up with these friends on a Saturday and agree that none of you will take cocaine. If you can't make it through the evening, you may be on the wrong side of the story."