The war was not large or long, taking only a few weeks. Even though most of Europe agreed with Denmark, no one made a move to protect it. The small Danish army was easily defeated at the battle of Duppel by the Prussian-Austrian army. This was only the first of three steps to a unified Germany under Prussia.
The next step was simply to kick Austria out of Germany. Austria was the only other country with the power to take on Prussia when it decided to make its move, and therefor they had to go. The next war, called the Austro-Prussian war, the war of 1866, or the Seven Weeks War, was brought about. Bismarck used the Gastein Convention, the agreement between Prussia and Austria about the control of Schleswig-Holstein. Under the Gastein Convention, Austria and Prussia held Schleswig-Holstein under a dual administration. This, as Bismarck has originally intended, caused enough friction to start a war.
The war was a short one. Prussia made giant advances quickly and defeated the Austrians even though Austria had some solid victories against Italy, who was allied with Prussia. Not wanting to weaken a potential ally anymore, Prussia was very lenient with the peace settlement. They demanded no land except for Schleswig-Holstein, though they annexed Hanover, Hesse, Nassau, and Frankfurt. These states, combined with Prussia became the North German Confederation. Austria also promised that it would no longer interfere in German politics and so it directed all its attention East, which created the Austrian-Hungarian Empire.
Now that Bismarck had annexed several of the German States and kicked Austria out of German affairs, there was only one step left in the unification of Germany under Prussia, getting the southern states to join the North German Confederation. Bismarck decided that the best way to do it would be to unite them against a common enemy, that enemy would be France. .
An opportunity presented itself when the throne of Spain was offered to a prince Prince Leopold of Hohenzollern-Sigmaringen, a member of the ruling house of Prussia.