One of the questions I most dread as a writer is 'where do you get your ideas from?'
It's like my turning round to you in the pub and saying 'How come you decided to talk about...' [the FA Cup Final, how David Cameron is getting fatter and fatter the longer he lasts as Prime Minister, the death of Princess Diana, Peter Greenaway films]. The fact is, there are so many ideas out there that it's impossible to move for falling over them - they're in the newspaper, in other books, in conversations that I'm participating in (or sometimes eavesdropping on), in observations of daily life (the little girl so absorbed in a book her mother can't get her attention, the toy monkey someone left sitting on a wall in the next street). It's like shooting fish in a goldfish bowl.
It's not where the ideas come from that's the problem. It's recognising the good ones (and knowing why they're good for me, which is quite a specific thing), and developing them from the status of a good idea to a fully worked up story.
So, for instance; 'How not to have sex'. I'd been watching a film - some eighteenth century costume drama, I seem to remember - where the lead characters came so very close to kissing so many times, but never quite did - someone else always came into the room, or someone called for one of them, or something happened... and I thought it was an interesting idea, but how could I make it work in erotica? Then I thought well, instead of gently touching like the film, let's have it quite comic - and then I thought of all the ways a planned quickie just might not happen, and it went on from there.
Sometimes it's just an image, and you worry it round your brain for a few weeks before it catches fire. The red shoes... that's a title with a lot of hinterland, and the image of a little pair of shoes was rattling around my head. Then I thought the cobbler, rather than the wearer of the shoes, would be an interesting focus. But where? Then Hampi in India came to my mind - the bazaar, the backpackers, the clash of cultures - and I adapted it slightly but tried to keep that atmosphere. By then I'd got the main characters, the setting and the rough story - the rest was refinement. (That story's at http://www.everynighterotica.com/red-shoes-anna-austen-leigh/.)
Then sometimes a novel gives you a chance to rewrite history. I've always been convinced that Horace Walpole and Thomas Gray had an affair. They went off on the grand tour together, and came back not speaking to each other... Well, in A grand tour I had a chance to write history the way I wish it had happened; I did change one of the names, as history is only the setting-off point.
So... ideas are everywhere. It's what you do with them that counts!