Some of the buzzwords that seem to be flying around fast and furious in RPG theoretical discussions these days include sandboxes and railroads. Railroads has been a term that's been in play for years and years, whereas sandbox as a term, seems a little bit faddish. I've only heard that recently, and I think it's an import from the world of computer game design theory. Let me define them right quick, as I understand them at least.
A sandbox gaming paradigm is one in which the setting or mileu in which the game takes place is static, and only shows signs of life when the player characters interact with it. The classic example is a completely open-ended site-based game design in which the characters can choose to go do anything they want to, pretty much, and as they interact with the sites on the site-based design, things that are waiting in those sites occur, whether it be a monster that attacks them, a treasure they (can) find or something along those lines. Site-based and sandbox go hand-in-hand (although that's not the only way to do a sandbox, it's probably the simplest and most direct.) Because of this, "old school" and sandboxes also go hand in hand. In fact, in some old-school discussions, I've seen folks nearly fetishize the sandbox.
In essense, they've created an ideal that never really existed, where in "the Golden Age" of roleplaying, the proscribed, accepted, and E. Gary Gygax-approved method of gaming was the sandbox, and everything that's come since is a dangerous heresy. I didn't start playing D&D back in 1974 in Wisconsin with the first group, or anything, but I think that attitude is a bit of hogswallop at best. For one thing, it appears that Dave Arneson and Gary Gygax differed in playstyle preferences, making the call of "original" playstyle difficult to ascertain at best. For another thing; who really cares who Gary did it? I'm much more interested in what works for my group. In my experience, which does go back to 1980 or so (although it was a few years later before I became a bit more integrated into the D&D hobby) people didn't always play pure sandboxes. In fact, I think a pure sandbox game would be rather boring, personally. The important thing to remember is that a pure sandbox is a theoretical endpoint on a spectrum... not necessarily a desireable goal in its own sake. Some sandboxish campaign design is certainly good in any roleplaying game, but it's not, and wasn't ever meant to be, held forth as an ideal to strive for so much as an extreme to avoid. Running a sandbox game either requires that a great deal of material is prepared ahead of time, or that the gamemaster have a highly developed skill at making stuff up on the fly.
A railroad on the other hand, is something that's never enjoyed a faddish adulation of idealised game design. For the most part, everyone recognizes that a railroad is a bad game situation. As you'd expect from the opposite of a sandbox, a railroad is a game in which the players have little choice to make; they can't go anywhere they want, and in fact they can only really do what the gamemaster wants them to do. Railroadish GMs are often would-be writers, who find themselves uncomfortable with "winging it" when a player character does something unexpected, so their goal is to cause the unexpected action to fail, get the player back on course, and have the game again proceed according to his predetermined plans for the game. The advantage of a bit of railroading is that you can present very interesting and complex scenarios to the PCs... because that's what you've spent your time preparing, instead of a bunch of other things that the PCs may or may not interact with, according to their choices. Of course, the downside is very obvious; few players enjoy having the GM's story read to them; they want to be creating the story themselves through their actions.
The kind of game I like to run utilizes some very limited railroading, and then a non-site-based sandbox idea. Here's what I like to do. The model is called narrow-wide-narrow (and I can't take credit for the name or the expression of the model; I was doing it kinda intuitively, but a much better GM than I had actually quantified this). In the beginning of a game; either a campaign or a one-shot either one, the players probably don't have strong ties to anything. They don't yet "stick" to the setting, or have any reason to get engaged with it. You need to be a bit forceful up front, giving the players more direction to get the game going.
While you do this, you also throw out a lot of potential plot hooks. See what the players are biting on. Let them gradually take control of the game. This is the transition from narrow to wide. The players want to set the agenda for the game, and pursue the things that they find interesting, not what you do (so make sure that the plot hooks are going to be just as engaging for you to run as it is for them to play.)
As you near the end of the game, there's probably going to be a lot of dangling threads, unresolved and un-followed issues. This is where you need to start narrowing it again. As you see that a potential end is in sight for the game, start bringing these back together. This is best accomplished if you don't plan very far ahead. Elements can be linked after the fact, and players can't tell the difference. You don't need to be a conspiracy mastermind to make it look like you are; you just need to keep track of what they've done, what they've discovered, and what your reaction as the arbiter of the setting has been to that. Start bringing all this stuff to a head, so the game can end on a high note, with a satisfying conclusion that leaves things resolved and done.
And that's my narrow-wide-narrow strategy. I find that games that veer too much into pure sandbox or pure railroad territory are equally unengaging, uninteresting, and ultimately, not very fun to run or to play either one.