Just a few days ago, on the second night of Pesach, we recited a special havdalah. Because we were going from Shabbos to Yom Tov we concluded the beracha by reciting "Boruch hamavdil bein kodesh l'kodesh." Both Shabbos and Yom Tov are special days endowed with kedusha but we are required to mention that the kedusha of Shabbos is greater than that of Yom Tov. The theme of the Sefer Avudraham is that all berachos and teffilos are supposed to be recited in the biblical Hebrew. Regarding this special text of havdalah that we recite, the author quotes the posuk which states that the role/purpose of the paroches in the Mishkan is to have a havdalah between the kodesh and the kodesh ha'kodoshim. We must be respectful of all items that are kodesh but we must also keep in mind that there is a hierarchy amongst these items. The Gemara points out that a sefer Torah has a higher level of kedusha than that of tefillin because it contains many more parshiyos; the tefillin shel rosh have a higher level of kedusha than the tefillin shel yad because the shel rosh contains two extra instances of the letter shin; and the tefillin shel yad have a higher level of kedusha than a mezuzah because the shel yad contains two more parshiyos than a mezuzah does. We must be careful to observe all of the mitzvos and minhagim properly, but life is always full of circumstances in which we are forced to choose between observing two mitzvos, and we have to choose which to observe based on the hierarchy in importance.
The Rambam writes (Hilchos Korban Pesach) that there is a special mitzvah to broil the korban Pesach while it is still intact, before slicing it into lamb chops. However, before we broil the korban Pesach we must remove the veins and the arteries. Broiling meat will remove the blood from the capillaries but not all of the blood in the veins and the arteries, and if we won't remove them, the whole korban Pesach will become treif. The Rambam writes that after broiling the korban Pesach we must remove the gid ha'noshe because that part of the leg may not be eaten. The Ra'avad writes sharply if he were in the Beis* Hamikdash and the Rambam would show him his korban Pesach, he would throw it on the floor and tell him that he is not permitted to eat it. If you broiled the korban Pesach with the gid ha'nosheh still inside it, one just made all the meat of the korban Pesach treif; just as the veins and the arteries must be removed before broiling, so too the gid ha'noshe. Rav Yosef Caro (in Kesef Mishnah) defends the Rambam's position by quoting the final psak of the Gemara in Chulin that gid ha'noshe has such a faint flavor to it that it does not make other food treif when they are cooked together. Therefore, since there is a requirement to broil the whole korban Pesach while it is still intact, we don't remove the gid ha'noshe until after the broiling. However, we still have a bit of a problem: it's true the gid ha'noshe has such a faint taste to it that we do not apply the principle of ta'am k'ikar, but the fats (shuman) on top of the gid ha'noshe are also prohibited, and the Rambam's opinion is that when cooked together with other meat the shuman ha'gid would make the other meat treif; so why don't we have to remove the shuman ha'gid before broiling the korban Pesach? To this Rav Yosef Caro responds that from the Gemara it would appear that the prohibition against eating shuman ha'gid is not even a rabbinical prohibition but is rather merely a minhag, and whenever there is a conflict between a real din and a minhag, (the real din in this case being the requirement to broil the korban Pesach when it is still intact and the minhag is not to eat the shuman ha'gid), we must observe the real din and violate the minhag. So, for three hundred and fifty three days of the year all the Jewish people observed the minhag of not eating the shuman ha'gid and one night a year, the night of Pesach, all those who ate the koban Pesach would be violating this minhag.
The Netziv develops the same theme based on a passage in a Gemara in the beginning of Berachos. An additional situation where this comes up might be the following: there is a widespread minhag not to take haircuts during sefirah. Many have the practice not to shave either. However, there is a real din of kovod Shabbos which entails making all proper preparations in advance of Shabbos. Some of the yeshivas would have the practice that all week long the boys would not shave during sefirah but l'kvod Shabbos they would. This was based on the above analysis that whenever there is a conflict between a real din and a minhag we must be mavdil bein kodesh l'kodesh, between kodesh chamur and kodesh kal and give precedence to observance of the din over the minhag.