Austria-Hungary was a union of the two monarchies of the ailing Austrian Empire and the nation of Hungary. The Austrian house of the Habsburgs was the ruling force within the empire
The empire consisted of large swathes of modern day Romania, Poland, Slovakia, Croatia, Bosnia and even Italy. There were fifteen different languages spoken within the empire and many different ethnic groups, including Germans as well.
By 1914 the Austro-Hungarian Empire was already on the verge of collapse. Decades of instability from its government had led to disillusioned populace and a general desire for ethnic separation and independence. When the annexation of Bosnia occurred in 1908, a large proportion of the Serbian population there rebelled, attempting to assassinate various Austro-Hungarian officials several times unsuccessfully. Eventually, during a visit to Sarajevo, the Archduke of Austria-Hungary was shot and killed by a Serbian assassin named Gavrilo Princip. This event would spark the powder keg of political upheaval that would trigger the beginning of the war in Europe.
The war saw the Austro-Hungarians succeed at first, repelling attacks by the Russians and advancing in Italy, though they began to lose both ground and men as the war went on. However, with the defeat of Russia in 1917, the empire could turn its forces towards the Italian front and in the October of the same year, the Central Powers launched an assault on the Italians. A combination of gas, artillery and infiltration tactics led to the defenders being routed and the entire Italian line being thrown into disarray. This became known as the battle of Caporetto, where the Italians lost nearly 300,000 men, most of them being captured, whereas the Central powers only had casualties numbering around 70,000. This battle also saw the rise of one of Germany’s greatest ever military commanders: Erwin Rommel.
This major defeat led to massive drops in morale amongst the Italians, but the battle was used as a reason to replace the current supreme general and change tactics. A year to the day later the Italians struck back, in the battle of Vittorio Veneto. With support from British regiments, the Italians began a push that would see the Austro-Hungarians forced from Italy in less than a month.
Several days after the beginning of the Italian assault, several nations including Hungary left the Austro-Hungarian Empire, forcing a huge withdrawal of their forces from across Europe. The empire collapsed, breaking into the nations that still exist today. Despite their defeat, Austria remained a stout ally of Germany, part of the reason that Anschluss was so well received prior to the Second World War.