In Order of the Phoenix, Dumbledore can't find a new DADA teacher, so they get Umbridge. But if he is the Headmaster, and the only one Voldemort ever feared, why couldn't he take up the teacher? He does seem like the most qualified person.
Several reasons spring to mind:
The curse on the job.
As is well-known, Voldemort placed a curse on the DADA job preventing any one teacher from holding the post for more than a year. The last four teachers have all left the school in unpleasant circumstances.
Although Dumbledore is a competent wizard, and one of the few people who Voldemort fears, it would be silly to place himself in harm’s way by taking the position and subjecting himself to the curse. It’s not worth the risk, especially given his importance as both headmaster and head of the Order.
The political situation surrounding Dumbledore.
Fudge suspects Dumbledore is getting ready to overthrow him. Taking up the DADA post would play right into these suspicions, and seem to confirm Fudge’s worst fears – that Dumbledore was using his students to build an anti-Ministry army. (Look at the fit they throw when they discover “Dumbledore’s Army” later in the book.)
He’s already on shaky ground with the Ministry after bailing Harry out at his hearing. He doesn’t need to give Fudge more reasons to come after him.
He has other, more important, things to do.
His work in the Order means he’s often away from Hogwarts, whether that’s at Grimmauld Place, looking for horcruxes, or something else. It would be difficult to keep up a regular timetable and lead the anti-Voldemort efforts. When push comes to shove, teaching would take a back seat to his real-life DADA work.
It’s probably better to let somebody else run the DADA classes, so the students get a consistent teaching experience, rather than the patchy one they’d get under Dumbledore. (Especially given the heightened importance of DADA after Voldemort’s return.)
I think Dumbledore was perfectly aware, that he, and only he, was powerful enough to counter Voldemort. At the end of GoF, he realized that Voldemort indeed had found backdoor to life, so he started his journeys to seek clues and also aid the Order itself.
So why he didn't teach ? Yes, he allowed a ministry spy in Hogwarts, but he knew that his time is more useful somewhere else. He was fighting to win the war, not the battle.
The answer isn't necessarily that Dumbledore could not have been DADA teacher, it's that Umbridge had to be DADA teacher because the Ministry wanted to place someone in Hogwarts and to exert influence.
By book 5, the Ministry (in particular, Cornelius Fudge) is becoming increasingly paranoid. Terrified at the thought of Voldemort's return, Fudge is determined to deny Voldemort is back and becomes convinced that there is some kind of conspiracy involving Dumbledore and Potter whereby Dumbledore (who is greatly respected, in general, by the wizarding community) is trying to take control of the Ministry and oust Fudge.
Thus Fudge begins a systematic campaign to counter Dumbledore. He interferes with Hogwarts (placing Dolores Umbridge at the school and subsequently giving her great and wide-ranging powers as Hogwarts High Inquisitor. He also influences the Daily Prophet to run a (pretty successful) propaganda campaign to discredit Harry and Dumbledore.
Fudge and the Ministry wanted to undermine Dumbledore, and the best way to do so was from within Hogwarts - Dumbledore's home so to speak - hence, placing a teacher at Hogwarts. The DADA position just happened to be open and that is why Umbridge ended up being placed in that position over others.
Certainly, Dumbledore was more qualified to teach DADA than Umbridge. But even if he had wanted to (and it is not certain he did, as the position would have been a burden on his free time to pursue other important activities) Dumbledore could not have refused Umbridge's appointment without serious implications for his own position within the political context of the time.
Or, considering that Dumbledore was unwilling to reign in excesses from the students (Draco, Ron, Luna's abusers) and staff (Snape) properly, allowing rampant bullying, incompetence (Binns) and outright child abuse (Snape, Harry's relatives, Umbridge), perhaps he just didn't care enough to put forth the effort.
In a world with magical oaths, unbreakable vows and potions such as Veritaserum, it's not like he didn't have the ability to prevent such occurrences. Therefore, if he didn't, that means he's unwilling.