In an interview to promote her new book, JK Rowling has revealed that one of the main characters has obsessive-compulsive disorder. It was based, she explained, on her own experience of the illness, which revolved around "checking, double checking, triple checking things". Hearing OCD talked about in a serious way, by a woman who obviously understands it well, comes as a pleasant surprise. It's a very different description of the illness from the one the actor Julianne Moore gave four years ago when she said: "Those are the indulgences you can have before you have children. Now I don't have time to obsess. All that stuff about, 'I need to go this certain way and do that' was an indulgence of my youth."

OCD is a relatively new term, but the illness has been described accurately as far back as the 17th century. It is also a common anxiety disorder – the Royal College of Psychiatrists says that one person in every 50 will suffer from some form of it in their lifetime, but the serious aspects of it are little understood by the general public. Stories about OCD in the media often mistakenly interpret a superstitious nature, or an obsessive tendency for order, as the definitive signs of OCD. How often do you hear a friend refer to themselves as "a little bit OCD", when really all they mean is that they like to colour co-ordinate their sock drawer?

It's frustrating to hear interviews with people who discuss OCD as though it were a minor quirk, rather than an all-encompassing pit of worry (an example of this is a story about David Beckham needing to line up all the drinks cans in his fridge). While you may read about neat drawers pretty often, there is very little mention of the terrible thoughts that people with OCD grapple with. The executive director of the International OCD Foundation, Jeff Szymanski, says that the term OCD is often used erroneously: "What you have seen in the media and pop culture is a rise in people misusing the term OCD. What they really mean is they are obsessive or compulsive. But they don't qualify for an anxiety disorder, which is what OCD is."

People with obsessive-compulsive disorder often develop rituals to deal with the upsetting thoughts they're having. A person worried about illness might become terrified of picking up germs, and so take to washing their hands hundreds of times a day. These rituals provide a sense of control, a short relief, but don't deal with the deeper issues.

From my own experience, I found that OCD can also take a purely obsessional form, and sufferers find their thoughts fixating on all manner of topics. During the worst of this anxiety, I spent every waking moment in thrall to my racing mind, and the irrational thoughts that are the terrible hallmarks of OCD. Songs, images and phrases would stick in my head, like a skipping record player. I found that if you try to push out these intrusions, your mind cleverly adapts and comes back with even more frightening scenarios.

Szymanski says that this technique of repression is widely known to be unhelpful: "Thought suppression actually increases the frequency and intensity of those thoughts. A lot of avoidance behaviours are just as detrimental as traditional compulsive behaviours."

Luckily, OCD can be helped with a huge variety of different medications and therapies. With help, I've found it is possible to overcome the thoughts and compulsions, and so it's great to hear about someone as successful as JK Rowling tackling it so well. The ignorance that surrounds mental illness often means that people don't seek help when they most need it. Huge progress has been made to try and remove the stigma from mental illnesses such as depression, now the same must be done for anxiety disorders. Let's hope the dated colour-coded sock drawer myth is on its way out.