It is the inevitable question that is asked of “great” (read: consistent, best-selling authors… or the writing instructor)… “Where do you get your ideas from?” I think it is to simple of a question, and too broad of a canvas to ask to be painted.
Writers get ideas from the world around them… from life stories that have been lived, and places that have been travelled. I’ve heard it said that the key question a writer would consider is, “What if…?” and see where that takes them.
However, another interpretation of this “classic” (and, I agree, annoying-at-times question) should be, “What have been your influences, and your interests?” A writer is somehow going to incorporate elements (some overtly, others subconsciously) of the writer’s they have read, and the styles that they like. Stephen King read a lot of noir/pulp fiction and ghost stories growing up, and it comes out in his writing. Tolkien was into mythology, and created the Rings series.
Writers get their ideas by paying attention to what is happening around them, and filtering those events through their influences. And if they arrive at a story they would like to read, then it will come out of them, like rain from the clouds, allowing the imaginations of others to be nourished from their experiences…