The creative writer unwittingly manages to make a mess of the ordinary thinking process: memory, imagination, and something approximating objective reality are all mooshed together into a dark, rich stew. The fragrant mess is being constantly stirred, the recipe changing, if not hour by hour, certainly from one week to the next: memory agitates, imagination warps, new stuff is learned and enters the mixture.
When the pursuit of new knowledge becomes systematic and purposeful, rather than a random gathering of tidbits, it's called research. And research is serious business in the writing of fiction; most stories of whatever length will require at least a little.
Research is as much a part of the creative process as memory and imagination. When I'm asked what an aspiring writer should study in college, I advise going easy on creative writing and literature, saving time for history, geography, biology, anthropology. Dig up courses that teach stuff. The more stuff a writer learns, the richer the soup.
For me, research and writing are commingled in an adventure of discovery. Just as I sometimes begin a story without knowing exactly where it's going, I often do research with no clear idea of what I'll do with the knowledge.