According to Yoga philosophy, the true teacher abides within each of us. That guide can lead us to the ultimate truth. But we first need to find this teacher. This is why we need an external teacher--one who has found his or her own inner guide. The sole job of the outer teacher is to lead us to our inner guide.
Why do we need an external teacher to find something within us?
The reason is that the voice of our inner guide is obscured by the ego, by our emotions, and by the constant chatter of our lower mind. One needs to go beyond chatter, pacify the emotions, and purify the buddhi (the higher part of the mind) to find our inner guide. The external teacher leads us through the practices and experiences needed for that to happen.