A dictator was the senior magistrate of the Roman Republic. They were regularly appointed from the earliest period of the Republic down to the Second Punic War.
Dictators had the full authority of the state to deal with a military emergency or to undertake a specific duty. The right of the Tribune of the plebs to veto his actions was extremely limited. However, to prevent the dictatorship from threatening the state itself, limitations were placed on his powers. A dictator had a clear sphere of authority. He had to resign once his task was done, or after six months.
After the Second Punic War, no dictators were appointed for over a century. Then the idea was revived by Sulla, and later by Caesar. Sulla was a tyrant, and Caesar was murdered soon after becoming dictator.
The office was formally abolished after the death of Caesar, and not revived under the Empire.