I've given this A LOT of thought. There isn't one answer. Ideas come from everywhere. Just look around you. At the grocery store, the park, the coffee shop, books, and the hospital. (Where I spend a lot of my time.)
Wherever there is atmosphere there is a story to be told. I see a picture of a giraffe. I think, hmmm, great picture book story. Or, I overhear an argument between a mother and her daughter at the mall. (Because writers ALWAYS have their eyes and ears open. Bam. A story idea hits me. We see something that triggers an idea. But of course we all know the ideas come our heads.
All writers have heads full of these wonderful ideas. If you're a science fiction writer you have ideas about that. But something triggers the idea. Just ask Beth about what really triggered her idea for ACROSS THE UNIVERSE. Something very simple. (Don't forget to buy the book.)
The non-writers will tell you they have this AMAZING idea and they want you to have it.
They say they only want to split the money when the book and er, movie come out. UH-HUH.
I just tell them I am working on my novel right now and have to spend all my writing energy on this project. :)
The ideas come and then we create these extraordinary worlds, with remarkable characters and incredible settings. Ahhhh, but it AIN'T EASY. Non-writers think that we whip out a book in a month. I had a man tell me (when he discovered I was a writer, because I had my laptop) at Christopher's hospital that he was going to write a book. In a month. And then he planned to send it to one publisher, S&S. He figured the book would come out in a few months. What did I tell him? Nothing. I nodded and smiled. There was no sense in going into a long drawn out, five hour discussion about it. He wouldn't have believed me, anyway.
I leave you with this quote from Neil Gaiman: "You get ideas from daydreaming. You get ideas from being bored. You get ideas all the time. The only difference between writers and other people is we notice when we're doing it." 'Nuff said. :)