The Hebrew root N-H-G (נ-ה-ג) means primarily "to drive" or, by extension, "to conduct (oneself)".
The actual word minhag appears twice in the Hebrew Bible, both times in the same verse and rendered in this translation as "the driving":
The watchman reported, saying, "He has reached them, but has not returned. The driving is like the driving of Jehu [grand]son of Nimshi, for he is driving [his chariot] recklessly." (II Kings 9:20, Tanach: The Stone Edition)
Homiletically, one could argue that the use of the word minhag in Jewish law reflects its Biblical Hebrew origins as "the (manner of) driving (a chariot)". Whereas Halakha (law), from the word for walking-path, means the path or road set for the journey, minhag (custom), from the word for driving, means the manner people have developed themselves to travel down that path more quickly.
The present use of minhag for custom may have been influenced by the Arabic minhaj, though in current Islamic usage this term is used for the intellectual methodology of a scholar or school of thought (cf. Hebrew derech) rather than for the customs of a local or ethnic community.
Observant Jews consider Halakha, Jewish law as derived from the Talmud, binding upon all Jews. However, in addition to these halakhot, there have always been local customs and prohibitions. Some customs were eventually adopted universally (e.g. wearing a head covering) or almost universally (e.g. monogamy). Others are observed by some major segments of Jewry but not by others (e.g., not eating rice on Passover). These minhagim exist in various forms:
Various sources in Rabbinic literature stress the importance of a long-held tradition, culminating in the statement "the minhag of our fathers is [equivalent to] Torah" (e.g. Tosafot to Menahot 20b s.v. nifsal). Custom can thus determine halachic practice in cases of disagreement among rabbinic authorities. In numerous instances, Rabbi Moses Isserles warns that one should not abolish long-held customs. (Isserles' gloss on the Shulchan Aruch was, in fact, written so as to delineate Ashkenazi minhagim alongside Sephardi practices in the same code of law.)
Despite the above, a minhag does not override clear biblical or talmudic enactments, and one may not transgress the latter for the sake of the former. In fact, any minhag that intrinsically involves an element of halakha violation is considered null and void (see Piskei Riaz, Pesachim 4:1:7).
The Talmud (Pesachim 50) rules that a valid minhag accepted by previous generations of a family or community is binding upon all later generations. The Rosh (Makom Shenahagu, 3) states that the Talmud's ruling fundamentally applies to practices undertaken by learned individuals; innovations by the unlearned need only be followed publicly. Other halakhic authorities hold that the Talmud's ruling applies to all valid practices initiated by either learned or unlearned individuals (for discussion of this point see Bach and Beit Yosef to Yoreh Deah 214; Shach, ibid., 214:7).
In most cases, personal acceptance of a new minhag is tantamount to vowing performance of that minhag. Consequently, abandonment of such a minhag typically requires hatarat nedarim or sh'eilat chakham, halakhic procedures for absolving oneself from oaths. This was often necessary when, for example, an Ashkenazi Jew moved to the Ottoman Empire and wished to join the local Sephardi community.
Jewish law provides for a number of mechanisms to change or remove a custom when it is held to be mistaken or illogical. (See Tosafot on Talmud Pesachim 51a; Maimonides, Mishneh Torah, Hilchot Issurei Biah; Be'er Heitev, Orach Chaim 182 in Hilchot Birkat Ha'mazon, Orach Chaim 653 in Hilchot Lulav, Orach Chaim 551:4 in Hilchot Tisha B'av.) Orthodox rabbi and historian of Jewish law Menachem Elon writes:
The acute displacement brought about by World War II and the Holocaust, and the large-scale immigration to the United States, various European countries, and especially the State of Israel, have led to a "liberal mixing" of various minhagim, and arguably the falling into disuse of certain customs. In addition, the baal teshuva movement has created a large group who have no clear tradition from their parents. In response to these phenomena, certain scholars have focused on the minhagim, and attempts have been made to revive minhagim that have fallen into disuse.
Nusach (properly nósach) primarily means "text" or "version", the correct wording of a religious text. Thus, the nusach tefillah is the text of the prayers, either generally or as used by a particular community. In common use nusach has come to signify the entire liturgical tradition of the community, including the musical rendition. It is narrower than minhag, which can refer to custom in any field, not necessarily that of communal prayer.
Both nusach and minhag can thus be used for liturgic rite or liturgic tradition though sometimes a nusach appears to be a subdivision of a minhag or vice versa; see different Jewish rites and popular siddurim under Siddur. In general one must pray according to one's "nusach of origin" unless one has formally joined a different community and accepted its minhag. (Perisha rules that if one abandons a nusach that has been accepted universally by the wider Jewish community, his prayer is disqualified and must be repeated using the accepted nusach: Arba'ah Turim, Orach Chayim, 120 ad loc).
The main segments of traditional Judaism, as differentiated by nusach (broadly and narrowly), are these: