Hagrid had this to say about Quirrell in Philosopher's Stone, ch. 5:
Brilliant mind. He was fine while he was studyin’ outta books but then
he took a year off ter get some firsthand experience ... They say he
met vampires in the Black Forest and there was a nasty bit o’ trouble
with a hag – never been the same since.
On Professor Quirrell's page on Pottermore, J. K. Rowling lists as his special ability that he is "Learned in the theory of Defensive Magic, less adept in the practise."
The picture given to us of Quirrel is that he is someone who is very "book smart," but not easily able to use his smarts practically. Also on his Pottermore page, J. K. tells us that she saw "Quirrell as a gifted but delicate boy, who would probably have been teased for his timidity and nerves during his school life." It was this teasing that led Quirrel to want to prove that he had skills to back up his knowledge, so he went and sought out Voldemort's weakened form in order to defeat him. Voldemort proved to be too strong for Quirrell, even in his weakened state, and overtook Quirrel's mind fully.
It's likely that even though Quirrel wasn't a powerful wizard, his book smarts and knowledge made him an excellent teacher. You don't always need to be able to do something in order to teach others how to do it. Quirrell was able, after all, to successfully teach the First Years how to perform the spells Verdimillious Uno, Lumos, the Curse of the Bogies and the Knockback Jinx. Additionally, in Order of the Phoenix, Umbridge mentions in her review of the Defense Against the Dark Arts class, that the only teacher who taught the class properly in recent years was Professor Quirrell, reflecting the Ministry's desire for the students to understand the theory of defense, but not the practice.