At the beginning of Book 22, the disguised Odysseus (Ulysses) has successfully completed Penelope's task to win her hand in marriage. Not content to take her and leave, he begins killing the other suitors, who had proven themselves unworthy with their arrogance and cruelty. As the battle wages, Athena appears in the guise of Mentor. She then changes into a swallow and watches from the rafters, assessing Odysseus's strength, before joining in and bringing a swift end to the battle.
Then Jove's daughter Minerva (Athena) came up to them, having assumed the voice and form of Mentor. Ulysses was glad when he saw her and said, "Mentor, lend me your help, and forget not your old comrade, nor the many good turns he has done you. Besides, you are my age-mate."
But she would not give him full victory as yet, for she wished still further to prove his own prowess and that of his brave son, so she flew up to one of the rafters in the roof of the cloister and sat upon it in the form of a swallow.
Mentor was the son of Alcimus and a friend to Odysseus. Because of his old age and his status as a teacher to Odysseus, the word "Mentor" has entered the language to mean a person, often older, who acts as a trusted friend and teacher to a younger person.