The city was Thebes. When Alexander was busy crushing revolts across the Danube, he received word that the Thebans were also revolting and that Athens was involved from the shadows.
In addition to this, news of Alexander had not reached the southern Greek city states in some time. He had been busy with the siege of Pelium and news had reached them that he had died during the course of this siege. Demosthenes - a prominent Athenian politician - produced a man who claimed to have been present at the siege and claimed that Alexander was dead. Alexander had indeed, been injured during the course of this siege, so it was not a totally implausible claim to make.
Upon learning of the alleged death of Alexander, Theban exiles in Athens raced off to their native city in Boeotia and sought to incite a revolt from Macedonian rule there. The Cadmaea, the citadel that was situated upon a hill in Thebes, was occupied by a Macedonian garrison, and it was this place that the Thebans sought to attack. To this effect, they killed two Macedonian officers who had been roaming the city, and declared their independence from Macedonia.
In The Campaigns of Alexander, Arrian states that Alexander was suspicious of the Athenians and believed that not taking the Thebans seriously might undermine his rule as "the spirit of disaffecion might spread" to a number of other states. That said, he did not immediately attack Thebes and instead chose to wait nearby to give the Thebans time to think things over and treat with him. They were however in no such mood and attacked Alexander instead with some effect. He consequently marched onto the Cadmeia, the citadel of Thebes.
The subsequent battle was bloody eventually leading to the army entering the citadel for an "urban battle" with the Thebans. The latter eventually gave up and fled.
In what followed it was not so much the Macedonians as the Phocians, Plataeans, and men from other Boeotian towns who, in the lust of battle, indiscriminately slaughtered the Thebans, who no longer put up any organized resistance. They burst into houses and killed the occupants; others they cut down as they attempted to show fight; others, again, even as they clung to temple altars, sparing neither women nor children. (Arrian, page 59)
The allied troops who took part in the fighting were entrusted by Alexander with the final settlement of the fate of Thebes. They decided to garrison the Cadmeia, but to raze the city itself to the ground. All its territory but the places hallowed by religious associations was to be divided among the allies; the women, the children and all the men who survived were to be sold into slavery ... (Arrian, page 62)
The result of the brutal Theban debacle was that the other fractious states such as the Arcadians, Eleans, Aetolians, and Athens itself decided to behave and immediately patched matters up with Alexander.
Therefore, going by Arrian's account, Alexander was hoping to quell the Theban revolt through a little muscle-flexing and diplomacy. The Thebans were not amenable (and were actually convinced that he was a fake) and decided to play rough. The fog of war and Alexander's bloodthirsty allies did the rest and he presumably let matters run their course to serve as a warning and a lesson to other states considering going the Theban route. At any rate, he did not arbitrarily raze Thebes in order to prove something.
(There is some suggestion that Darius was funding these uprisings.
The expedition against Persia had been long in the works, and Alexander did make it a secret that he planned to avenge the atrocities committed in Greece by Persia a century and a half before. Despite that at the time his kingdom had been a Persian vassal state. It was as a result of this planned expedition that the Great King Darius III started to distribute money to the Greek city states with the hope that they would rise against their new Hegemon.
After razing Thebes, Alexander began his Persian expedition.)