Kingmaking can be a desired feature in its own right
Particularly in games with a political or simulational bent, kingmaking can be a desired feature. The kingmaker gets to feel like he accomplished something even if he didn't win, and the tension and turnabout can contribute to a more exciting play experience.
Thesunneversets' answerThesunneversets' answer addresses this much better than I can.
Threats of kingmaking are a strategic tool
"If you take me out, I'm going to make it so that you can't win afterward."
In most games, this isn't really a problem. It's just allowing players to use a "rattlesnake" defense when their more conventional defenses have faltered. Mutually assured destruction is basically a higher-stakes version of the normal tit-for-tat trading that goes on in strategy games.
When every game session turns into a complex web of MAD checks-and-balances leading to a spectacular flameout, though -- well, at that point you've gotta either call it a feature or redesign the game.
To reduce rattlesnake behavior, players need a way to trump the rattlesnake's threat, e.g. by more slowly setting up a victory that can't be disrupted. Is one player keeping the whole table at bay with an overgrown Shrine of Burning Rage, for instance? It's important for the game to have cards like Krosan Grip, Trickbind, and Shining Shoal to stop him.
Undesirable kingmaking is a motivation issue
In the previous case, the kingmaker is still looking to win; he's just holding the threat of you losing over your head to keep you from taking an action against him. Full-on kingmaking behavior is a motivation problem, resulting from players abandoning the goal of actually winning the game. Two possibilities exist here:
Winning is no longer a reasonable goal.
If a game puts a player in a situation where she can no longer win, then that player is functionally aimless. Such players may turn to kingmaking because it's the only way they can still interact with the main goal of the game, indirectly.
If you want some overly reductive advice, either eliminate losing players quickly or provide some "come from behind" / "alternate victory" mechanisms so they can still engage with the game's goals.
Alternatively, a less winner-take-all model can keep players "playing to win" even when they're not in a position to actually seize first place. This is probably easiest in games with results that roll forward, such as tournaments where even finishing 3rd vs. 4th has an impact on overall scoring, or wargaming campaigns where the disposition of your surviving units has as much of an effect on future battles as the win/loss outcome of the skirmish itself.
Winning is a reasonable goal, but a player has decided to dismiss it.
I think this is really a social issue. The player has broken with the goals of the game and created his own. Part of good game design is avoiding this by keeping players engaged with what they're supposed to do, but as a layman I honestly can't speak to how good games do this.
One thing you can definitely do as a game designer is to clearly signpost your "come from behind" features so that players don't feel a game is hopeless when it's not.
Beyond that, though, the players themselves need to address disruptive kingmaking as a sportsmanship problem: fundamentally what's happening is that a player is following the rules but not the spirit of the game. Sometimes it's because the kingmaker has lost interest, sometimes it's because social goals have trumped gameplay.