A good idea will often require additional knowledge that you don't possess and you'll discover you need to do some research in order to make your story convincing. Research comes in many shapes and sizes, from seeking out a forensic pathologist and requesting an interview so you can pin down that serial killer, to spending hours searching through history books, contemporaneous accounts and academic articles over the internet and in the library. Writers of fiction usually aren't academics and so often have a magpie approach to research, going for the shiny bits, easily distracted, forever poking at one idea with their mucky beaks before dropping it and moving on to the next glittering thing. Other writers take it upon themselves to become experts in their chosen subject. But whichever your favoured approach, the most important thing is to pursue your interests. If you think something is absolutely fascinating, it's likely that passion will come through onto the page.

Sometimes the most difficult thing about research is knowing when to stop, when to let it go so that you can concentrate on your story. We've all had the experience of reading a novel where the research is too evident on the pages, where the writer feels compelled to jam in every last detail about what kind of buttons that regiment wore on their jackets and where, in fact, those buttons were made, and what, exactly, was the correct way to polish them. It's as though the writer is thinking, I took 10 years to learn all this stuff, so I'm going to damn well share it with you.

There's a particular type of very important research that writers often find necessary but don't like to talk about too openly. It's called lying on the sofa, or staring blankly out of the window for ages. This type of research is as important as the time spent observing schizophrenics at the secure unit or hard at it on Wikipedia. Like everyone else, writers need time to dream, and this dream-time can be highly productive and useful. In an interview about how she writes Val McDermid explained how the unconscious plays "a huge role" in her work; "This is the only job (apart from being a sleep-research guinea pig) in which you can work while you're asleep" If you don't spend time lying on the sofa immersed in the world you are imagining, why would any reader want to lie there as well?

Philippa Gregory on how to research a historical novel

The first rule I apply when writing a historical novel is that it has to work as a novel, as well as be absolutely based on the history. The broad narrative of the history imposes the story of the novel, all I can choose is when to start and stop. The only time I invent an occasion in the life of an historical character is when we simply don't know what they were doing - and then I choose the most likely explanation.

But the details of research I only use in service to the story-telling. Thus if a conversation occurs at dinner and we know what is said, that conversation goes into my novel and if we have the exact words so much the better. But the detail of the table setting, the food, and the entertainment only come into the description if it really helps to set the scene, give the atmosphere, animate and illustrate the scene. This means I don't use strange words or technical terms without explanation, and actually, I only use them at all if they help the scene to work as well as a scene in any sort of fiction. However pleased I am to have learned something arcane, it only ever goes into the novel if it adds to the understanding and enjoyment of the reader.

Ideally, I should know more as an historian than I tell as a novelist. I should see the scene, and the background to the scene, I should know the means of transport waiting outside the window, and whether the window is glazed. The reader only knows to see the scene, everything else should only help them to see it vividly and to understand its importance. It is called historical fiction and I believe it has to be both: well researched history and well written fiction.

· Philippa Gregory's novel, about Mary Queen of Scots, is The Other Queen