In brief: The Austro-Hungarian Empire was dissolved at the end of World War I, after being defeated. The same thing happened with the German Empire.
The empire was split up into different countries, some part of its territory was taken over by the victorious belligerents.
This is What happened with the Austro-Hungarian Empire
Europe´s Map from 1914
Europe´s Map after World War I:
The Austro-Hungarian Empire was a multinational (multi-ethnic) political entity, where power was shared between the Austrian and Hungarian elites. In its last conception and under the name of Austria-Hungary, it lasted from 1867 to 1918. It was formed after Austria lost the Austro-Prussian war and barely contained a Hungarian rebellion, after which it gave more importance to the Hungarian elites and a bi-national character at the expense of other nationalities such as Poles, Slovenes, Croats, Bohemians, Romanians, Ukrainians, etc.
During the 19th century, the French geopolitical game was to support nationalism as a way of weakening other European powers and both Austria-Hungary and the Ottoman Empire were particularly easy prey to this policy. Several nationalist movements are emerging in the Balkans that are giving birth to the creation of the kingdoms of Serbia, Montenegro, Bulgaria and Romania, among others, at the expense of the Ottomans.
The Austro-Hungarians managed to contain some of this, but got involved in the Balkan booty, even occupying Bosnia. While they managed to avoid dissolution in several nationalities, the problems remained latent.
The Austro-Hungarian Empire was formed after the Austro-Prussian War, or the Seven Weeks War, which it lost. The rising star within the Germanic community was the Kingdom of Prussia (i.e. the Brandenburg electorate who bought a distant Polish dukedom on the east coast of the Baltic Sea to proclaim himself king), which wanted to become the engine of German unity, which it achieved by defeating Austria in 1866 and France in 1870. Formed the German Empire in 1871, it seeks to continue growing in power, launching itself into the colonial partition of Africa and the game of European alliances. Like France, Germany is playing at making alliances and the other rival powers are playing against each other.
Another new country is Italy. Italy wants to grow in part at the expense of Austria-Hungary. But, finally, the German Kaiser achieves a common defense treaty with Austria-Hungary and Italy, known as the Triple-Alliance Pact.
Germany also signs pacts with Russia (if the UK or France attacks Russia or Germany, the other side declares war), but the French also want a pact with Russia. Seeing that Russia and France are dawdling on each other, Germany in the middle makes a plan in case it has to fight them both at the same time: Invade Belgium and the Netherlands to get to Paris, quickly, knock out the French and move the troops east to knock out the Russians.
And we come to the 20th century, and to 1914. Bosnian nationalists, supported by Serbia, assassinate the Crown Prince of the Austro-Hungarian Empire. The German emperor sees this as an opportunity for Germany to emerge as the great winner. He gets Austria-Hungary to declare war on Serbia (allied with Russia), Russia declares war on Austria-Hungary, Germany, because of the Triple Alliance, declares war on Russia, hoping that France will declare war on Germany.
Everything goes perfectly until they invade Belgium. The Belgians resist, they blow up their railroad tracks and deny them to the Germans. The French manage to mount a defense. The British join together after the invasion of neutral Belgium, and that was Troy. The western front becomes a carnage of trench warfare.
Meanwhile on the eastern front the Austro-Hungarians have problems containing the Russians. Hardly relieved when the Germans decide to attack Russia.
This video shows year by year the map of the Austro-Hungarian Empire:
Italy does not feel bound by the Triple Alliance pact because it considers that Austria-Hungary and Germany were the aggressors. Finally Italy enters the war on behalf of France and opens the Alpine and Adriatic front against Austria-Hungary. In return, Austro-Hungarians and Germans receive the Bulgarians as an ally of the Ottoman Empire, which was also crumbling.
The war is prolonged and with it the wear and tear and in the end it becomes a game that collapses like an empire first. The only one who was relatively safe was the British Empire, which was, moreover, supported without penalty by the United States. Austria-Hungary fought against the Russians and Romanians in the East, against Italy in the Alps, against the Serbs in the Balkans, and against their own nationalities raised by the French.
The first empire to collapse was the Russian empire, in the midst of a communist revolution.
In order to cut off U.S. supplies to Britain, the Germans are making one of the biggest mistakes: they are trying to convince Mexicans to declare war on the United States. Mexicans silently decline, but the Americans still find out and declare war on Germany.
The last chance that France collapsed before Germany collapsed is lost to the United States (and all its industrial and financial power).
In the middle of 1918, the situation is untenable for the Ottomans and the empire collapses and withdraws from the war. With only Germany as an ally, and with its own military leadership problems against Serbs and Italians (fortunately no longer Russians), and with internal problems, Austria-Hungary collapses.
And a few months later, Germany surrenders.
The Austro-Hungarian Empire does not have the internal strength to remain a political entity. The anti-monarchical liberal movements, communist movements, nationalities, etc. oppose the emperor. Finally, Austria-Hungary was at the mercy of the victors and the 1919 Treaty of Versailles formalized the creation of Czechoslovakia, Poland, Ukraine and Yugoslavia, the Transylvania session to Romania, and the separation of Austria and Hungary.
In brief, an empire that was already weakened by internal problems and the emergence of nationalist sentiments is invited to a war that could not be won by an ambitious neighbour and ends up being divided up.