First off, it's all a matter of nuance. They share their meanings, but not how they are used. That is, nippon 日本, nippongo 日本語, nipponjin 日本人, etc. all mean exactly the same thing as nihon 日本, nihongo 日本語 and nihonjin 日本人, etc. in Japanese.
So if the meanings are the same and even the kanji are the same, what's the difference between nihon and nippon?
Po's Over Ho'sWell, it's so very simple it's actually stupid if you think about it. The difference is... nippon ニッポン sounds stronger than nihon ニホン. In fact, the Japanese alphabet treats po as ho with an accent. Just try saying it. "nihon." Meh, it just doesn't have the bang. Now say "nippon." It's almost niPOWn, isn't it? Now that's a bang.
Now you must be thinking: "just what the fuck does that have to do with anything?" The answer is a mix between formality, pride, culture and maybe a pinch of assertion.
Glorious Nippon SteelUsually, when the Japanese people talk about their country, Japan, they will use the word nihon. That's the common word. The normal word. The default word.
However, when they want to pass the feelings of how great they think their country is, that is, to show their pride for the nation of Japan, for the stuff Japan does or makes, they will use nippon, as that word sounds more imposing than nihon.
Now. That second scenario basically never happens. You can talk about how great Japan is without using nippon, it's just that some people would deliberately say nippon to put more emphasis on their point.
As with all human things, pride doesn't need to be justified. You'll notice that nippon is often used in sports events for example, where the Japanese people cheer for the Japanese team. Some of those sports include soccer and Japan is like 50th in the worldwide FIFA ranking. Still, it's their country so it's normal they'd cheer for it no matter how much it sucked.
Glorious Nippon Anime
All this talk about Japanese pride and stuff might have gotten you thinking: is nippon a word only Japanese people can use? After all you can't possibly feel pride for a country that isn't even yours, right?
It's a word, not a cop. If you're a fan of Japan, the country, and want to sound obnoxious by saying nippon instead of nihon, just like Japanese people would, then sure, go for it. Who can blame you? If you want to use it to make jokes on the internet, who cares? It's not like there's some sort of anti-nippon power rangers going around the web writing tickets to foreigners who use the word.