To players, mechanically, Inspiration is a token you spend to gain advantage on a roll, and that’s all it is. You can only ever have one of these tokens in your possession, which is incentive to use Inspiration up quick and not hoard it. You can also pass that token to others, so you might do that if you’re about to get a second one.
The true reason Inspiration exists, though, is this: it's a mechanical reward for playing the way the Dungeon Master appreciates. The guidance is thin, and that’s what it comes down to, though the guidance doesn't say it in such explicit terms. To support saying that, I’ll quote in full everything (everything) from the Basic Rules about how you acquire Inspiration, barring the example, found on pages 35-36:
Inspiration is a rule the Dungeon Master can use to reward you for playing your character in a way that’s true to his or her personality traits, ideal, bond, and flaw.
Your DM can choose to give you inspiration for a variety of reasons. Typically, DMs award it when you play out your personality traits, give in to the drawbacks presented by a flaw or bond, and otherwise portray your character in a compelling way. Your DM will tell you how you can earn inspiration in the game.
(further down, after the example...) Additionally, if you have inspiration, you can reward another player for good roleplaying, clever thinking, or simply doing something exciting in the game. When another player character does something that really contributes to the story in a fun and interesting way, you can give up your inspiration to give that character inspiration.
That’s all the guidance there is in the Basic Rules. The guidance suggests to use Inspiration for roleplaying consistent with one’s character sheet, but then gives the DM the freedom to choose to award it however they want:
Your DM will tell you how you can earn inspiration in the game.
So given that, and the fact the DM is the only one who can create new Inspiration, the entire mechanic comes down to being a device to encourage the players to play the way the DM wants.
That can be used to constructive or destructive ends. People are going to have Opinions about how Inspiration should be used, and what ways are good or bad, but the Basic Rules guidance begins and ends at the above. That guidance certainly seems to fit in with D&D’s established notion that the DM has precedence over the players, and enhances that idea.
Inspiration could be used like Fate points, and awarded as compensation and reward for a player making a mechanically suboptimal choice. (Apparently, the Starter Set suggests as much!) However, D&D 5e presently lacks pretty much all of the mechanical support and a large amount of play guidance that drives Fate points working the way they do. Note the conspicuous absence of “the players can suggest they should probably get it” in the guidance, for instance. Choosing to use Inspiration this way is entirely a choice of the group. The management of Inspiration can also be made by group cooperation, but again, that’s a choice of the group.
It seems the authors could have included Inspiration to be a solution to all those complaints of “my player isn’t roleplaying consistent with their character’s alignment and story!” - since then the DM just penalises that player with no Inspiration whilst they’re doing that. I have Opinions on whether this is healthy for the game, and so will others.
At the end of the day: consider whether there’s behaviour you want to encourage in your game, and if it’s healthy to provide mechanical incentive for players to behave that way. If so, use Inspiration for that.
The only real guidance we've seen for awarding inspiration is what you've seen in Basic, and there is a small bit of box text on it in the starter set adventure.
The Starter Set box text suggests awarding inspiration for when a character plays their flaws or their ideals in a way that is negative to them. This provides a small incentive for them to take less than optimal, but more interesting character routes.
As far as frequency, that is going to depend entirely on your game at this point. In general, I would be liberal with the awarding of it as a single die roll with advantage is not a huge mechanical advantage. However, you may want to meter it at least a little bit to encourage players to pass around the inspiration football.
Best Answer
If you're the DM, you can give inspiration for anything you want. But dice roll results are probably not what you want to encourage here.
Obviously the DM is in charge of everything at the table, up to and including overruling any published rule or detail from any official or unofficial source. But inspiration is even more explicitly under your control.
Ultimately, inspiration is a reward for playing in a way that the DM likes. If one of your players comes up with an idea that is creative and true to their character, as described in your question, I would award inspiration on the spot. For me, what earns the inspiration is the player thinking like their character and engaging with the game enough to come up with a clever idea.
Execution of the idea is irrelevant to the gameplay features I care about, and dependent on dice. Inspiration is not meant to be a randomly awarded prize. I would want to reward the player's approach to the game and creativity, and not the outcome of an arbitrary roll.
In response to Chronocidal's excellent point:
It's not good to let players game an approach like this. My ideal situation would be players coming up with a clever idea, taking concrete steps towards it, and then having an inspiration die to help actually pull it off.
As novel example, I play tabletop games with a lot of people that like to min-max stats and experiment with optimized builds. But that's at the metagame level, and has nothing to do with the in-game behaviors that I particularly appreciate.
So my players won't get inspiration for taking an off-the-shelf build and playing it with a mathematical eye. However, if one of these players makes a suboptimal decision in-game (or even an outright error, given meta-knowledge) because it is true to their character or deepens the game in some way, I very well might award inspiration even though that choice makes "success" less likely.