Easy now, this has all happened before (and will happen again so long as Kim Jong Il or someone from his family, like his son, is in power)
Let's look at the formula that's been very well established over the years.
1) North Korea is essentially contained, by and large. Their only economic trade outside of their borders is with China and whomever they can sell soviet era weaponry to. While they trade with China, even the Chinese have grown wary of relations with North Korea over the years. It's nothing personal, it's just that Kim Jong is completely and utterly batshit crazy, and they know this very well from putting up with him for years and years.
2) Because North Korea is largely contained, and therefore mostly forgotten on the other side of one of the most formidable lines of defense established at the 38th parralel, the only way that Kim Jong can get anyone to even notice that N Korea still exists is to do something belligerent and flashy. Like setting off a nuke underground or test-firing a missile
3) Precedent, precedent, precedent. If you'll remember, a couple years ago (or was it one year ago?) when they set off their first underground nuke.... what was the response? We promised massive amounts of free food, oil and other commodities if they gave up their nuclear program. Now, we gave them their food and there were images on TV of a cooling tower being collapsed by the N Koreans, but it was not their main reactor, we knew that they didn't really disassemble their program but we didn't make much of a stink about it (keep in mind this was all during the Bush administration, dealing with a nation that he included in the so-called axis of evil) Why was there not a harder response from us?
Because it's all a game.
Every couple of years, North Korea does something flashy to get attention, we throw a few trinkets at them and say "okay, now go back behind your wall"
The reason why this time around is particularly more flashy than normal is for a couple reasons.
1) Since Obama took office he pretty much hasn't said or done jack about N Korea. They're not even on the radar of this administration as Obama's dealing with a nation in the throes of a collapse that's been coming ever since the early 70's when we went off the gold standard. So Kim Jong, the batshit crazy nutcase that he is, is personally enraged that the shiny new U.S president hasn't so much as looked in his direction yet.
2) Kim Jong is getting old, and the fact that he's batshit crazy combined with old age is making him even more unstable. Possibly more unstable in that he might order an all out attack against S Korea, but no one is seriously concerned about that. The real concern is that now that it's clear that his time as absolute ruler is coming to a close, there are lots of generals in the army jockeying for position. One line of thought is that a group of generals will take over and run the country, either using him or his son as a kind of figurehead that will be trotted out in front of the masses from time to time. Another line of thought is that Kim Jongs son actually will take the reigns as absolute dictator, in which case various generals right now will be jockeying for position to garner favor with him, in order to secure a good spot in his future regime.
Just my two cents 