From a comment on +Trent B post.
For a variety of reasons I have no problem with players doing whatever their character can possibly do during the course of a campaign. With that attitude comes some practical problems. How to present setting detail with minimal or no prep.
A computer can use algorithms or procedure to generate new content on the fly. The problem of this technique it doesn't scale for people. Beyond a certain point the players are sitting around twiddling their thumbs while the referee is busy rolling.
With random tables this breaking point can be extended by clever design as found in +Zak Smith 's Vornheim. But eventually even that falters with the players waiting.
The way I have overcome the issue is what +Brendan S mentioned, the "Bag of Stuff". It is a process of memorizing elements so you just can come up with stuff on the fly. The downside that it rewards experience and practice. It something that a novice is not going to be good at right away.
Personally I use something close to a Palace of Memory. Through experience I note recurring elements of my campaign. Then I think of variations of them. For example different type of peasant huts. Medieval Building styles. Buried in there there is a typical example which I focus on and I build variations off of that.
For more detailed things, I have a folder full of generic templates and characters that I reskin as needed. I have a dozen floorplans I cycle through for a random castle.
For you reading this, what will work for you will vary from what works for me. And it will very well likely involve a multiple of techniques. The important thing to remember is to be aware of what you do. Note the patterns in things you create or use. How you use them. That your starting point from which you can refine the techniques for you that allow you to make up stuff on the fly.
I consider the ultimate test is to be able to sit down at a table with nothing but a bunch of players with characters and run the whole thing from the top of your head. I will also add even if you do master this, I don't recommend trying this all the time. But by mastering this and becoming comfortable with this situation, then the typical sessions with a mix of improv and prepped content becomes that much easier.
Remember the thing that sets tabletop roleplaying games apart from their computer and LARP alternative is allowing the player to attempt anything their character can do. That what makes tabletop roleplaying special in the 21st century. So whatever you can do to enhance that aspect of the game the better off the experience will be.