I'm going to say it up front: I'm tackling a pretty big topic here. There have been countless forum threads talking and talking about it, and there's no definite answer at all. I'm not saying I have the gospel truth here, I'll just give my personal opinion.
Today, we'll talk about Railroading. Read the article, it's actually a very good representation of the subject, with a few good points on how to avoid it.
So, do I endorse railroading or not? Well, I can't say I'm against it under certain circumstances. Especially when you are new, it can be a pain in the arse just to get your player together with a common objective, and very time-consuming on a first session; even though I groan at the cliché part of it, You All Meet in an Inn is not that bad. Railroading might also be a life-saver in circumstances where you didn't anticipate your player's actions at all, and they are heading right to a place you have not been prepared with (or, even worse, who could be important for a later part of the plot). Just subtly arrange things so that they can't go there, and at the same time, provide them with some hints of where they should go. That's a nice way to use railroading, and in itself, it's not bad.
However, ask yourself the opposite question: how much of an impact do you want your players to have on the general plot? If you have written this very epic story, where the fate of the world(s) is in the balance, but your players just stand on the side and watch, you're probably heading the wrong direction here. I did play once in a very railroaded scenario, where we were just there to kill the monsters while the plot was moving without much of our consent, and it was no fun at all. If you give not much freedom to them, you are railroading them too much, therefore making them even more eager to wreck your plot as much as they can. Or not, some players are perfectly comfortable in being railroaded (remember what I said about knowing your players?).
It doesn't mean the answer to that question is "Yes, they have a complete control over everything" either. This is probably the best way to a complete train wreck (see what I did there?) if you are not really experienced. Even more so, it is incredibly complicated to prepare anything if they can go anywhere they want and do whatever they want. Chances are they will completely ignore your plot in order to go shopping, rob a bank or something else you really don't want to!
While railroading is pretty much inevitable whenever you want to introduce a new plot, in order to get the story moving in his very beginning, I'm pretty much an advocate of free-roaming myself. But I have the easy method to allow that to work: I give the players the freedom of means, but not the freedom of the story.
Of course, that's a rather straightforward example. Not every game follows the "get mission => do mission => get prize" structure. But it can work the same for a more open-ended quest. You have to fix an objective, secret or in plain sight, and design useful and antagonistic events/NPC/items that naturally comes with the objective. Your player don't have to see them all, or to get them in order, but if they ever have to came in contact with it, you are prepared. Don't try to imagine every possible outcome: it's impossible, and every GM can testify that players will do anything except what you were prepared to.
It doesn't mean you have to accept everything your player throw at you. I tend to be very forgiving, but acts have consequences, and you don't have to feel ashamed to say "no" once in a while. No, you don't have to be okay with your players torturing someone to death to get an information (unless it's the tone of your campaign, of course). No, just because your contact is in the Maffia doesn't mean he's aware of every nasty plot in town. No, whatever you might say, the priest won't help you since you beat some of his men last week and he hates you. Just because they can solve the problem any way they want doesn't mean you have to accept all their ways.
I have a very simple formula for those situations. If what your players want to do is affecting a pivotal plot point of your story, if it does change the situation to the point there's no coming-back, or if it allows them to jump completely several essential points, you have the right to keep the leash strong and refuse that development with a story twist. However, if it doesn't affect an important point to the point of destroying it, if their action is naturally in their reach, or if it's inconsequential overall but pleases the player, let it go and just roll with it.
And here you have it. It's something we will probably come back later at, but you don't have to plan everything in your scenarios. If there's too much information you are trying to cram into one game, you'll probably end up railroading without thinking, just to be sure everything went through. In fact, the less you plan, the more you have to rely on improvisation and adapt your way of creating other scenarios, and the less you'll have to rely on railroading. Except, once again, when the situation really needs it, because, as they say around theses parts, Tropes Are Not Bad.