As soon as someone knows you are a writer, the second question they ask (after, "What do you write?") is, "Where do you get your ideas from?"
I can understand the question. Me looking at creative endeavors outside my own skill set - painting, for example - I find myself wanting to ask the exact same question, especially modern art. Man, I'll never get that.
Still, my answer is the exact same answer as every other writer I've ever heard from. It boils down to, they just appear. There is no rhyme or reason to them: sometimes they pop into our head fully formed out of nowhere; sometimes we might see a picture or a snippet of dialogue and something about that random connection will stop us, have us mull over it, and over minutes or hours (heck, maybe even years) a story will eventually form from it.
Sometimes we are working on our own demons (whether consciously or not). Sometimes we are just having a blast with some weird thought and running with it. Sometimes we deliberately try to make a point or give commentary; sometimes we want to tell a story that was inspired by events, only we want to tell the story 'right' or give it our own twist - meaning with romance authors, we want to give it a happily ever after!
Whatever the source, most authors would agree the final product is usually light years away from that original spark that inspired us to create the story. The revision process is brutal, and a coherent story is much different from having a random "Wouldn't it be cool if...?" thought.
Still, I look forward to the day where someone comes up to me, someone who enjoys my stories (when they are published) and tells me that they enjoy my work, and asks where do I get my ideas from. Not only is it the ultimate compliment, it will remind me to never take for granted that ability, however it forms, for ideas for stories to come to me.