At first glance, the mentor is a pretty straight forward character. Look deeper though and they can be complex. A mentor is there to impart their knowledge onto the hero. A mentor is usually scholarly to some degree. If not, they have life lessons to teach along with their special subject.
Take Obi-Wan Kenobi, for example. When we first meet him, he is the only source of knowledge on the Force, excepting Darth Vader. Later on we get to meet Yoda but in ‘A New Hope’ it is just Obi-Wan. Luke, despite being too old to take up formal Jedi training, is taken into hand by the old master.
Having lived a long life Obi-wan has a lot of experience. Along with teaching Luke about the ways of the Force, he must temper his impulsiveness. Giving in to impulse is seen as being weak and could potentially lead to Luke’s death or worse, the dark side.
Other characteristics Mentors have are; curmudgeonly, e.g Doc. Hudson in ‘Cars’, true believer, e.g. Morpheus in ‘The Matrix’ and strange but in an all-knowing, comforting kind of way, the best example of which is Mr Miyagi from ‘The Karate Kid’.
Sometimes Mentors must die in order for the hero to take the correct path at the crossroads in their life. Obi-Wan’s death at the hands of Darth Vader is shocking to Luke despite barely knowing him. This is not always the case, for example could you imagine Mr Miyagi dying?
Why do we have mentors?
Basically a mentor is a representation of experience and knowledge. Passing our experience on the next generation is a fact of life. If knowledge did not get passed down, you would not be reading this right now. Language would not have evolved and we would still be sitting in the trees wondering where our next meal was.