There are several levels of law in halakha.
A1. The מצוות דאורייתא, mitzvot d’oraita, 613 Mitzvot (commandments) – These are all found directly in the Torah.
A2. Laws given to Moses at Sinai, Halakhah le-Moshe mi-Sinai, הלכה למשה מסיני.
These are laws not stated in the Torah, nor derived from it by logical principles (hermeneutics.)
These laws have been known to us from antiquity: they were accepted by the sages of the Mishnah as being as ancient and authoritative as the laws in the written Torah. They were transmitted, some perhaps from the time of Moses, through Judaism’s oral tradition, until written down in the Mishnah. In a way, they constitute additional mitzvot, which one can add to the 613. But not because we are changing the Torah or adding to it. Rather, according to our history, these rules were always part and parcel of Torah, even if they were not written within the admittedly small text of the Torah.
As in all cultures, not all beliefs and practices are written down at once. Maimonides lists 31 of these mitzvot in his Mishnah commentary introduction: 31 Halachos L’Moshe MiSinai according to the Rambam
Usuallt, extensions of Torah laws are not Halakhah le-Moshe mi-Sinai. If a primary rule is given in the Torah (abstain from labor on Shabbat) the elaboration doesn’t count as a Halakhah le-Moshe mi-Sinai. In the Mishnah and Talmud, the rabbis elaborate 39 categories of labors prohibited on Shabbat; these are merely elaborations of the Torah mitzvah and not additional mitzvot. See the piece by Rabbi Jack Abramowitz, 31 Halachos L’Moshe MiSinai according to the Rambam.
However, in some cases, details for how to observe a mitzvah are included in this category. There seems to be no firm rule for which statements count in this category, but over time the list made by Maimonides has been seen as authoritative. Some examples are
1. That the loaves of a thanksgiving offering need a half-log of oil;
2. That the offering upon completion of a nazir period requires a quarter-log of oil;
7. Minimum sizes, such as of food for blessings;
10. The parchment to be used for tefillin;
11. The parchment to be used for mezuzos;
20. The ink to use for writing a sefer Torah;
25. That a field with ten or more saplings may be plowed right up until Shemittah;
It is often taught that we must believe that the Halakhah le-Moshe mi-Sinai literally came from Moses. But even a cursory reading of the Talmud and Midrash show that the rabbis didn’t believe this. Jewish tradition actually teaches that the term means a rule accepted as if it was given to Moses. Rabbi Shalom Berger (Orthodox) writes
“In the brief chapter on “Halacha L’Moshe MiSinai” in Menachem Elon’s HaMishpat HaIvri, Elon points to the well-known Midrash (TB Menahot 29b) – that describes Moshe Rebbenu sitting in Rabbi Akiva’s Talmud class and not understanding the discussion – and ends with Rabbi Akiva quoting the source for his teaching as “Halacha L’Moshe MiSinai” – as a proof that the term can be used to mean that a given teaching is known and accepted *as if* it had been given to Moshe on Mount Sinai.”
B. The seven rabbinic mitzvot – שבע מצוות דרבנן, Mitzvot d’rabanan. The Talmud notes occasions when rabbis of the Mishnah and Talmud actually created new mitzvot (commandments.) They are:
1. Saying blessings over pleasurable things (מצוות הנאה, e.g. fruits), over the fulfillment of a mitzvah (e.g. brit milah), and over various natural phenomenon (e.g. seeing the Great Ocean, i.e. Mediterranean Sea, or lightning) or significant (e.g. meeting a king) events. These additional brachot are together counted as one, for the purposes of the mitzvot d’rabanan.
2. Washing one’s hands before eating bread.
3. Eruvim: 3 kinds of “mixings” to allow: (a) carrying on Shabbat in a courtyard, which can be extended (eruv xatzeirot, the usual referent of ‘eruv’), (b) walking more than a mile on Shabbat outside a city (eruv t’xumim), (c) preparation of food on a Yom Tov (holiday) for consumption on the Shabbat that immediately follows it (eruv tavshilim)
4. Recitation of Hallel (Psalms 114-118) on most holidays and on Rosh Chodesh
5. Lighting of Shabbat candles
6. Public reading Megillat Esther on Purim, both evening and day.
7. Lighting candles on the 8 nights of Chanukah.
The 7 are not grouped as such in the Talmud: the list is first compiled by R. David Vital in his book כתר תורה ((1536, listing the mitzvoth, according to the choices of the Rambam. The numeric equivalent of the Hebrew title, ‘Keter’ adds up to 620 [613 + 7] in gematria (numerical mysticism.)
C1. Gezeira d’rabanan. A rabbinic fence law, aimed at deterring one from doing something that is prohibited.
For example, one may not place food directly on a fire before Shabbat in order to keep it heated during Shabbat. This is a fence around the law against cooking on Shabbat. To prevent the gezeira from being violated, a metal cover, called a blech in Yiddish, is placed on the stove top before Shabbat with the flame (turned to a low setting) under one section and the pot with food placed on the blech. This blech serves as a fence, allowing heating of the food without any danger of violating the law. Note that a “gezeira dirabanan” becomes binding only if it is accepted by the community. From the Soc.Culture.Jewish.Faq
C2. A Takanah is rabbinic legislation. The term often refers to directives aimed at imposing a duty to perform a particular, act. Some are rulings not to engage in particular acts e.g. the 2 famous takkanot of Rabbeinu Gershom (c. 1000 CE – not marrying more than one woman, not opening another’s mail).
D. Minhag, Custom.
Minhag is any act that the masses, on their own, accept. A minhag against actual halachah is called a minhag ta’ut (mistaken minhag.) Any based on a misunderstanding is a minhag shtut, a foolish custom. These two should not be followed. Any nearly universal minhag is called a Minhag Yisroel, and has most of the stringencies of law. (Yarmulka, and Ma’ariv services are two examples of a Minhag Yisroel.)
– SCJ FAQ
E. P’sak. A rabbinic ruling. Any individua can ask their rabbi a question, and since a rabbi is trained in Jewish law, the rabbi’s answer is generally considered authoritative. This does bring up the question of “who is a rabbi”, because the rabbinical semichah (ordination) that Jews have today is not the classical semichah that existed in the Mishnaic and Talmudic era. Rather today’s rabbinic ordination is היתר הוראה – a permission to pasken (decide halachic questions).
Not every question asked to a rabbi results in a p’sak halakhah: The rabbi’s answer is sometimes only considered a p’sak when it involved an original analysis. If the rabbi finds it sufficient to reply by citing already existing laws and customs, then the response is just a regular answer. (e.g. “May we count seven men as a minyan? ” “No, it needs to be 10 men”.)
A rabbi traditionally may not offer a p’sak when within the presence of his/her own teacher! The exception is that one may override one’s own teacher, if one becomes recognized as a Posek (expert in a particular area of Jewish law.) What is a posek? Posek (article on Wikipedia)
Rabbi Yitzchok A. Breitowitz adds an important constraint in making a p’sak.
“Halachic decision-making is not a matter of a Rabbi secluding himself in a room and getting a direct answer from G-d which he then communicates with ex cathedra authority. Indeed, based on the verse, “It [the Torah] is not in Heaven”, the Talmud declares that prophecy and Divine inspiration cannot be taken into account in the resolution of halachic questions. All halachic resolution depends on a solid empirical grounding in the facts coupled with a reasoned application from the primary texts that Jewish law considers to be definitive, e.g. Talmud, Codes. Ad hoc decision-making that is not rooted in these texts is generally illegitimate.”
Is Posek shopping permissible? (Asking multiple rabbis the same question, in order to get the answer that you want.) Here is a response from the website of the Union of Orthodox Congregations (Modern Orthodox, USA)