Of the cardinal sins of being a game master one of the worst is railroading. Railroading is when you take the free will away from the players. This can be as dramatic as the GM simply saying no when the players want to go a different way to there being impossible to beat obstacles at every other path.
Why would a DM use such as tactic in the first place? Well, it definitely helps with trying to get players to follow a particular path. However, there are players who aren't particularly fond of railroading. So while your story may progress the way you want it to, some players are going to feel like they’re just there for the ride, rather than taking a more active role in your adventure.
When railroading players, you’re completely undermining a player’s sense of accomplishment. Players that are forced into a particular situation through brute force tend to get surly and enjoy the game much less than if they have the illusion of free will.
The way to avoid railroading is to develop adventures that do not require players to proceed down a single path to complete the adventure. Branching is a much better method of devising a strategy of what will happen in a game. come up with 3 or 4 options at each critical decision point and if the players chose something you didnt think of its time to shine as a GM and improvise.
The best games sometimes happen because you didn't predict where the players were going to go and you have to get creative with the situations.