If you ask two rabbis the same question and they give you opposite answers (one says mutar the other says assur). Which do you listen to?
The gemara in Niddah 20b suggests it is forbidden to ask a second rav once a first has ruled on an issue (so as not to detract from the honor of the first one). Others (based on Tosfot) read it to mean the second rav should not answer the question once he knows a first rav has ruled on it.
A sage that declared something tamei, his colleague is not permitted to declare it tahor. Similary, if a sage forbade something, his colleague is not allowed to permit it. (translation: artscroll)
As @DoubleAA notes in comments, another gemara (Avoda Zara 7a) is even more explicit
The Sages taught: In the case of one who asks a question of a Sage with regard to an issue of ritual impurity and the Sage rules that the item is impure, he may not ask the same question of another Sage and have him rule that it is pure. Similarly, in the case of one who asks a Sage a halakhic question and he deems it forbidden, he may not ask the question of another Sage and have him deem it permitted.
In a situation where there were two Sages sitting together and one deems an item impure and the other one deems it pure, or if one deems it prohibited and the other one deems it permitted, the questioner should proceed as follows: If one of the Sages was superior to the other in wisdom and in number, one should follow his ruling, and if not, he should follow the one who rules stringently. Rabbi Yehoshua ben Korḥa says: If the uncertainty exists with regard to a Torah law, follow the one who rules stringently; if it exists with regard to a rabbinic law, follow the one who rules leniently. Rav Yosef said: The halakha is in accordance with the opinion of Rabbi Yehoshua ben Korḥa.
(see also MT Hilchot Mamrim 1:5 - thanks @DonielF)
Rav Binyamin Tabadi ruled that this was only the case if the first rav is a recognized talmid hakham who knows how to posek halacha, and not just someone who consulted a book. In practice and after the fact, if the second rav bases his psak on the writings of a major recognized posek, it is possible to rely on this instead of the first rav.
To your distinct one. Make yourself a Rabbi so you won't be in doubts.
"Rabban Gamliel would say: Assume for yourself a master; stay away from doubt; and do not accustom yourself to tithe by estimation." (Quoted from Avos, chapter 1:16)
You would prefer listen to the Rabbi of the place (מרא דאתרא)
Exemple of the concept in talmud
במקומו של רבי אליעזר היו כורתין עצים לעשות פחמין לעשות ברזל בשבת (על מנת להכין איזמל לברית מילה) במקומו של רבי יוסי הגלילי היו אוכלין בשר עוף בחלב. – מסכת שבת קל,א
Nowaday this concept is also why ashkenazes follow ashkenaze rabbis, and so on for sepharad etc, so mara de-atra is not just defined as the rabbi next your street, that's a whole concept itself