If there were a celebrity among brain chemicals, it would be dopamine. Supposedly released whenever we experience something pleasurable, it's forever linked to salacious stories of sex, drugs and wild partying in the popular press. The Kim Kardashian of neurotransmitters, it gives instant appeal to listless reporting and gives editors an excuse to drop some booty on the science pages.

There are too many bad examples to mention in detail, but I have some favourites. The Sun declared that "cupcakes could be as addictive as cocaine" because they apparently cause "a surge of the reward chemical dopamine to hit the decision-making area of the brain". The article was topped off with a picture of Katy Perry, apparently a "cupcake fan" and, presumably, dangerously close to spiralling into a life of frosted-sponge addiction.

The dopamine stereotype is not just reserved to the jauntier sections of the tabloid press. It can also be used as a way of making any of your views sound scientific. It's a simple formula – if you disagree with something, just say it releases dopamine and imply it must be dangerously addictive. Forbes magazine recently ran an article claiming that America's gun culture could be due to firearm addiction because dopamine is released, it claimed, when a shot is fired "meaning not only are guns addictive, but automatic weaponry is far more addictive than most". It was clearly just a smokescreen for the views of gun-hating liberals.

Now at this point, some of you may be worrying that I'm about to pour cold water on the pop science party and forever banish booty to the gossip columns, but I like to think that knowing the details is a more like putting acid in the punch bowl. When you can see how weird dopamine really is, a whole new world opens up.

Dopamine is indeed involved in addiction, but it isn't a "pleasure chemical". In fact, dopamine has lots of functions in the brain – being involved in everything from regulating movement to the control of attention. In great part, its effects depend on which of the brain's pathways it is operating in. The wonderfully named tuberoinfundibular pathway regulates hormone release and is important in stimulating the production of breast milk. This is why an unfortunate side-effect of antipsychotic medication used to treat schizophrenia, which primarily alters the dopamine system, can be lactation, even in men.

But when you hear about dopamine in the press, it's usually a vague reference to the role of dopamine in the mesolimbic pathway – a small but important brain tract that connects a deep brain area called the nucleus accumbens to the frontal lobes. Even here, however, dopamine has differing effects because while the chemical is the same, there are various forms of receptors that detect the presence of dopamine but do something different, depending on their type. The type that makes the glamour mags is the D2 family of receptors, which are affected by stimulants but are also linked to episodes of psychosis. It is no accident that too much speed or cocaine can make you paranoid.

The most widely accepted theory of what mesolimbic dopamine is supposed to do concerns its role as a feedback signal for predicting rewards. The theory goes that, a bit like me, it's the nerd at the pool party who gives a running commentary on how well you're doing with the temptations on offer. If you get lucky, a surge of dopamine signals a success, but – and this is where the "pleasure chemical" idea breaks down – it also signals when you only manage an uncomfortable near-miss.

Studies on roulette players have recorded as much activity in the nucleus accumbens when punters lose money with a miserable near-miss as when they have an enjoyable win. In this case, dopamine seems not to be signalling pleasure but indicating how close you got to the reward and encouraging another attempt. This works well when success depends on skill but falsely compels us in games of chance.

Addictive drugs alter this motivational system but, crucially, this is not the same as their pleasurable effect. Many long-term addicts report that they get little joy from their hit but that they still feel compelled to continue. Similarly, dopamine blockers don't stop drug-induced highs and only certain sorts of dopamine boosting drugs, when taken in a certain way, produce pleasure. It also seems that how the drugs affect the neurochemical signal is also key. Surging or "phasic" dopamine is more associated with reward motivation than "tonic" or background dopamine levels.

If this is making your head spin, it's worth saying that there is much more down the dopamine rabbit hole, as the brain's motivational system is complex to the point where the neurotransmitter is also involved in motivation to avoid unpleasant experiences. Traumatised war veterans, for example, show nucleus accumbens dopamine surges when they are reminded of the sounds of battle, something they find deeply aversive.

But even though science doesn't give the "dopamine is a pleasure chemical" concept a second look, I can guarantee that you won't see the end of it. Even though it's wrong, it's just too useful a media prop to be tossed aside, like some half-smoked cigarette. After all, anything that can bring Kim and Katy to the party can't be an empty high… can it?