The nation of Italy was divided for much of its history, only reunifying in 1861. The unification, dubbed Risorgimento, was actually a process from about 1848 to 1870.
In 1815, the Vienna Congress restored Austrian dominance over the peninsula, although Italy really existed as Austrian Lombardi and Venice in the north, the Papal states, and several dominions such as the Kingdoms of Sardinia and Sicily.
Inspired by the French revolution, nationalist Giuseppe Mazzini sought a unified Italy. From that point, revolution swept the peninsula and destabilized the many Italian territories. A Sicilian revolt granted the region a constitution, a papal revolt drove the Pope from Rome and established a republic, and the Sardinian King Albert helped in the war to drive the Austrians from Northern Italy.
The tide for reunification wavered as the Austrians beat the Italians in the war to reclaim northern Italy. However, Napoleon of France later transferred Lombardy to Sardinian sovereignty after France beat Austria in a war. An election soon after left only Venetia under Austrian rule, ever increasing the Kingdom of Sardinia.
Instrumental in the reunification of Italy was Giuseppe Garibaldi. He waged war against the Austrians again after the first unsuccessful attempt, and recovered much territory for the Italians. When Austria lost the Seven Years War to Prussia, Italy gained back Venice, and later, when Napoleon withdrew, Italy gained back Rome. By 1871, Italy was united with Rome as its capital.
Garibaldi (left) and Mazzini (right)
Sources: Wikipedia, Spark Notes, Library.thinkquest.org, Arcaini.org