What are the parameters and conditions of when one is allowed (and not allowed) to ask another Rabbi once he/she got a Psak from the first Rabbi?
I believe the Kitzur Shulchan Aruch says you must tell Rabbi #2 that you already asked Rabbi #1 (and honestly convey both your question as posed to him, and his answer!).
The Chochmas Adam has more guidelines on dealing with poskim and psakim; hopefully I'll have more info later.
This assumes that rabbis 1 and 2 are just random rabbis you ask.
However, sometimes a rabbi is in a position of exclusive authority over a certain sphere, at which point it could be obligatory to follow his rulings vis-a-vis that sphere. Rabbi Mordechai Willig believes that an Israeli soldier may ask his home-town rabbi a personal-only question like "what text should I use for my personal prayers?" Any question affecting the army's performance must go to an army rabbi. (Though Rabbi Gil Student cites a differing view here, that one may confirm with one's personal rabbi that the army rabbi's psak was within the boundaries of reason.)
Rav Aryeh Kaplan in his Collected Writings quotes the Shach as far as the exact parameters pertaining to this question. His basic points are:
I am writing this from memory of Rav Kaplan's book, the Shach (I looked it up at the time I read R Kaplan's essay), and the Rosh (who is probably based on the Tosafos YS is referring to) so this is possibly an incomplete guide but it has the basics as I can recall them.
If I find online links and when I get ahold of the exact sources I will bl"n put them on to this answer.