A foreign enemy called the Acqui had vanquished one of Rome's armies and was rapidly approaching the city. The Republic was in deep trouble.
Cincinnatus was a former consul and renowned military leader, so in their panic, the Roman Senate unanimously appointed him as an emergency dictator.
All of Rome's individual freedoms were immediately suspended. Checks and balances were eliminated. Cincinnatus would have supreme power to do whatever he saw fit during Rome's time of crisis.
According to ancient Roman historians, Cincinnatus told his wife, "Go and fetch my toga," and he immediately went to work.
Cincinnatus was legendary: he mobilized a new army, repelled the foreign invaders, and saved the city from certain destruction, all within just 15 days.
But even more importantly, Cincinnatus relinquished all of his power immediately after the victory, and returned to his plow. It was a display of virtue and selflessness that Romans celebrated for centuries.
Most dictators, of course, are not so principled.
The ancient Greeks (despite having invented democracy) routinely appointed dictators during times of national emergency.