The strategy and philosophy behind it is to make nuclear war so terrible to contemplate that there is no way a country with a stable government would ever want to start one. This is essentially how we maneuvered through the Cold War, with as many as 27,000 nuclear weapons on both sides, and nary a one was fired (thankfully). This is one reason I am not that afraid of a nuclear North Korea or Iran--they know that to use even one nuclear weapon on the US, Israel or an ally would result in their complete annihilation. While their leaders may sometimes be crazy, they are not stupid.
I think the strategy behind it is that no government would use a nuclear weapon with the knowledge that it would ensure their own and their own people's destruction, since the recipient country or recipient country's allies would respond in kind.
It's important to remember that the best example of nuclear deterrence we have in history is the cold war, in which both the Soviet Union and the United States possessed nuclear arsenals more than sufficient to destroy each other, and both had response systems in place that would have enabled a quick enough nuclear counterattack.
On that history, one can make the claim that nuclear deterrence works.
But that doesn't necessarily mean it makes you more secure. Lower level, conventional conflicts can still erupt, though they seem less likely to erupt into full scale war. For example, in the case of India and Pakistan, nuclear deterrence has proven effective. There have been skirmishes between the two nuclear armed countries, but nothing significant.
I'm late to this party, but I thought I'd throw in on this topic. MAD is only theoretical and the Cold War proved that it was only a valid political theory. We had several events, most notably in 1983 Operation Able Archer, which showed that the actual use of nuclear weapons was very possible despite the "theory" of MAD due to mechanical frailty and human mistakes associated with the actual deployment and tactical procedures surrounding nuclear arsenals. So strategically, it didn't prove reliable. We all just got very, very lucky.
There was a time when it appeared that the possibility of total destruction by nuclear war will be an effective deterrent for wars of all kinds. However, the experience of past few decades belies this expectation. There have been enough wars and enough destruction. Some of these wars, like the Vietnam fought by USA has been highly destructive without any positive outcomes.
Another big threat that has now become apparent is that of international terrorism. Threat of nuclear war did not deter the terrorists from the 9/11 attack. This problem has become much more serious with real possibilities of nuclear weapons falling into hands of terrorists. Also we need not rule out the possibility of some highly irresponsible government coming into power in some of the countries with nuclear capability.