In the Lubavitcher community we speak of a rav and a mashpia, and they both refer to a mentor. Yet although the two terms are similar and often used interchangeably, I believe it is important and advisable to make a point of distinguishing between them. It may come as a surprise to some, but these are in fact separate roles, and should therefore be clearly understood as such, so they can both be taken advantage of as appropriate.
The former term, rav (from the expression of the Mishnah, “asei lecho rav”) refers to an individual whom one chooses simply as an objective outsider, in order to offer advice and guidance. This person need not be otherwise qualified.
In contrast, the latter term, mashpia, usually refers to someone very knowledgeable and scholarly in Torah in general and in the wisdom of Chassidus in particular, who sets a personal example of putting these teachings into practice, and who holds some sort of official communal position.
Along these lines, in the preface to Tanya the Alter Rebbe writes that if one has any questions concerning the meaning of his words in Tanya, one should consult with “the great ones of one’s city,” which in our times would refer to the local mashpia. Through consulting him one will learn the correct understanding of the Alter Rebbe’s words when one is in doubt, and how to apply the Alter Rebbe’s words to one’s own situation.
Although one’s rav and mashpia may be the same person, they need not be. For the former offers practical guidance in dealing with personal problems, while the latter guides one in one’s service of Hashem according to the teachings of Chassidus.
Naturally, a chossid will prefer to seek an asei lecho rav who is knowledgeable in the teachings of Chassidus and who is exemplary in putting these teachings into practice, for this will definitely assist him in his task. Still, the rav need not do so on the advanced level of a mashpia in order to fulfil his role.
(It should be further noted that when an issue of halachic significance arises, a chossid should consult, in combination with discussing the matter with his mashpia and asei lecha rav as appropriate, with his local Chassidishe Rov—see here.)