Napoleon's downfall was a slow process that actually began many years before Napoleon was actually overthrown by the Allied Forces in Europe. Napoleon's first military defeat was in 1810 when his general Masséna was defeated in Portugal in Napoleon's Peninsular campaign. As well as the peninsular defeat, Napoleon had never won a water battle against Britain and that was a great step-back for his expansionist dreams. However Napoleon's biggest defeat was in his Russian Campaign, in 1812, there he lost around 200,000 men and a lot of his prestige. This campaign was originally carried out because of Napoleon's expansionist aims in the east and north of Europe and because the Tsar refused to join Napoleon's Continental System, the System in itself was a weak spot in Napoleon's rule, it aimed at crippling Britain by ceasing trade with the island, however it backfired, Russia refused to join and several other countries boycotted the System, this weakened Napoleon. Despite these defeats, Napoleon was still a very powerful man, and did not show any more signs of weakening; he still held a firm grip on his conquered lands and single-handedly governed the states and led the army.
In January 1814 France was being attacked on all it's frontiers, but the allies made it clear that they were fighting to defeat Napoleon, not France. Napoleon was basically being attacked because in 1813 he had refused to sign the treaty of Matternich, which would restore all France's natural frontiers and avoid a war. During the first three months of 1814, Napoleon managed to fight off the attackers, due to strategic advances and retreats, but it was not enough to definitely ward of the enemies, mainly because of the overwhelming number of troops the Allies had available. In March 30, 1814, the Allied troops of Austria, Russia, Prussia and Great Britain took Paris, and set up a provisional government headed by French-man Talleyrand, who quickly proclaimed the deposition of Napoleon,, and arranged for Louis XVI's brother, Louis XVIII to be king. Persuaded that further resistance was useless, he was finally convinced to abdicate on April 9.
Napoleon was sent to exile on Elba, over which he had sovereign principality and an annual income of 2000000 francs to be provided by France. He was also allowed an army of 400 volunteers. Meanwhile, in mainland France the recently restored Bourbon Monarchy was being strongly opposed. Napoleon's exile lasted little over nine months, in Elba he had been alone (his wife and son were not allowed to join him) and virtually powerless, so he single-handedly organized a hostile "re"-takeover of France. He left Elba with his 400 troops and reached Paris on March 20, as soon as he arrived, Louis the XVIII, was overthrown an Napoleon was brought back to power. But once again he was being tackled on all frontiers by the Allies and inevitably the whole dispute came to one final decisive battle: Waterloo.
Napoleon was crushed in his final battle and forced into exile in the distant island of Saint Helena, where he would be supervised by British guards and would pose no threat to the peace and order of mainland Europe.
It took this long for the Allies to finally defeat and get rid of Napoleon because of his basically enormously efficient war strategy, he managed to ward off his enemies in battle and despite his defeats he managed to hold on to his conquered territory for longer then his enemies had expected. However, because there were so many of them against Napoleon alone, it was increasingly easy for them to surround him and tighten the circle around his empire until it was impossible for Napoleon to fight back for any longer, unfortunately that took longer then the Allies had hoped for.