There are basically three types of spiritual teachers: those that are not spiritually advanced, those that are spiritually advanced but not enlightened, and those that are enlightened.
Ramana Maharshi said that an unenlightened spiritual teacher is like the blind leading the blind. For the most I agree.
You will receive the most benefit by being in presence of an enlightened spiritual teacher. You will learn simply by being in his company. A liberated soul emanates an enlightened presence that your energetic body will perceive even in you are not consciously aware of it. Through repeated exposure to the enlightened presence you energetic system will learn how to attune to that state even when you are not in the presence of the enlightened teacher.
A spiritually advanced teacher can connect with the deeper reality and emanate an energy that vibrates at a high level. And seekers at a lower state can benefit by being exposed to such a high-vibrating energy.
Unfortunately most seekers cannot tell if a spiritual teacher is spiritually advanced or enlightened. They are guessing. Only some who has reached an advanced spiritual state can discern the spiritual state of someone else. That is why I created a list of enlightened people.