There are levels of teachers. The common teachers, who teach at yoga centers, gyms, and even at Universities, are people who have learned from others, practiced what they learned to the point where they could receive credentials, and are now teaching.
They are not masters of Yoga, but may have learned from masters. They are teaching what they learned, from their teachers and books, rather than from their own direct experience of the Center or Consciousness.
This sort of teacher is essential for one starting on the spiritual path. At first we need to learn the basic techniques, attitudes, philosophy and lifestyle that will prepare us to receive the ultimate teachings, and this is what this sort of teacher can give us.
It is only after we have learned and sincerely practiced the techniques, etc., for a long time that the need for a Master may arise. According to the Tradition, when we are fully prepared, the Master will appear.