I've spent most of my life insatiably questioning everything I come across. If I'm even vaguely uncertain about something, I'll ask about it. Turns out asking questions can come in handy when writing a story as well. I'm going to use Tolkien in today's example because, well, he's awesome.
I can't say I know Tolkien's exact writing style, but I know that he worked out his worlds in great detail, so I imagine he knew before he wrote his story at least some of what was going to happen. Hobbit gets a ring, Fellowship goes on a great quest. Okay, but then in order to make it interesting, he had to create obstacles that didn't look like they could be easily solved. And how else to find the best obstacles than to ask a bunch of questions?
So Tolkien decides the characters have to go through Moria. They come to the end of the road, and they're going to go into the mountain. So they could just go through, or they could have some trouble. It's a great place for trouble, so why not toss some in?
Here's where the questions come in. Start by choosing one direction the story could go in, then ask questions until you either reach an impasse, or you find a way through.
What if they simply can't find their way into Moria? Well, that would mean that they had to find another way to continue on their journey. And Gandalf has already decided there is no other way. So what then? Well, they'd have to go back. Backtracking doesn't make for a very interesting story, so that's no good.
What if there's a key just lying by the door? That seems kind of silly. Gandalf looks under the welcome mat in front of the Doors and finds the key? And why would they just leave a key out here, anyway. That doesn't seem like a very safe practice with all the nasties about.
What if one of the characters turns out to have a key? Tolkien could do that, but he'd have to write the key in earlier. Who would have the key? Where would they have gotten it from? Again, they'll know they have the key, and it won't be much of a challenge.
What if Gandalf blows the door down? Well, Tolkien has his reasons to not make the wizard frequently display god-like powers. For one, it would make the mission seem easy, and thus remove a lot of interest from the story.
What if they have to say a key word? How would they find out the right word? Well, they could have to try and figure it out. Tolkien has already established the use of riddles in Middle Earth, so he could make it into a riddle. Gandal is good at riddles. What happens while Gandalf's trying to think of the answer? How about getting them into more trouble?
Asking questions is a good way to stir up some trouble and get to a deeper understanding of your worlds. Think about all the things we know about the 'real world,' from how stoplights work to what the major religions are to how to order a sandwich in a fast food restaurant. Your characters should know their own worlds that well, and the only way to learn about a world is by asking questions.