The Austro-Prussian war lasted from June 15, 1866 to August 23 of the same year. It is sometimes referred to as the Seven Weeks War, despite the fact that it lasted more like nine if my math is correct. The war was fought between Prussia, who allied with Italy and a few small north German states, and Austria, who allied with several smaller German states such as Bavaria, Wrttemberg, Saxony, Hanover, Baden, and the Hesses.

The German Confederation, which included all of the aforementioned states with the obvious exception of Italy, had captured the formerly Danish territories Holstein and Schleswig. The administration of these two states was covered in the Treaty of Gastein, which was signed on August 14, 1865. Austria and Prussia, however, both had different ideas about how the territories should be governed, and when Austria decided to bring their dispute before the German diet as well as convening the diet of Holstein, Otto von Bismarck, then Prussian chancellor, really flew off the handle. He declared that Austria had nullified the Treaty of Gastein and he then proceeded to invade Holstein. Austria in turn said that Prussia had broken the treaty by invading Holstein and took the issue to the German diet. The German Confederation's diet responded by voting to mobilize the military against Prussia, whereupon Bismarck declared the dissolution of the German Confederation. All that was left was to pick teams.

Austria took most of the German confederation, leaving slim pickings in the German lands for the Prussians. The Prussians allied themselves with Italy, who had been wanting to recover Venetia from Austria anyway, and a few other north German states who thought that it would be a bad idea to be on the bad side of the most powerful state in north Germany. When the fighting began, however, there really wasn't any question which side would win. Prussia was truly a force to be reckoned with, and history books tend to use words like "crush" and "squash" to describe their victories in this war. Italy, who apparently only got into wars around this time to get their ass kicked, lost several battles, both naval and land-based, but it still didn't faze Prussia. The most decisive battle came at Sadowa (also known as Koniggratz), in East Bohemia, where the Prussians whipped the Austrian army quite soundly indeed on July 3.

Bismarck, who probably started this war in order to further his master plan of unifying all of Germany, did not want to annihilate any potential allies, though, so he was quick to push for peace. A cease fire was signed at Nikolsburg on July 26 until a more permanent arrangement could be signed at Prague on August 23. Austria was made to promise never to mess with German affairs again, and had to give Venetia back to Italy. Prussia got to annex Hanover, Hesse, Nassau, Frankfurt, and Schleswig-Holstein. Additionally, the German confederation was dissolved and replaced by the North German Confederation, which Prussia dominated.

After the war, Prussia became the dominant force in the region, a fact that France did not like one bit. Napoleon III had had his eye on the German Confederation as a potential conquest, and he had been thwarted by the dominance of Prussia, so he demanded more territory from Germany in the form of the Bavarian Palatinate and Rhenish Hesse. Bismarck refused. Napoleon then demanded Landau and the Saar. Again, Bismarck would not give in. Napoleon then asked if he could just have Luxembourg and maybe annex Belgium later, to which Bismarck responded, "Knock yourself out" Napoleon was satisfied, as was Bismarck, who immediately sold this information to the remaining South German states in exchange for a secret military alliance, as was the fashion of the day. So, in a lot of ways, this war helped a great deal to unify Germany and thus was a success for Bismarck.

Sources: http://www.bartleby.com/65/au/AustroPr.html, http://www.cusd.chico.k12.ca.us/~bsilva/projects/2ndreich/a-pwar.htm