The Torah mentions several times that Bnei Yisroel are the am hanivchar. What exactly does that mean? Does it mean that just like parents sometimes favor one child over the others Hashem favors Klal Yisroel, and therefore we can get away with all kinds of mischief? This is clearly not the intention! First of all, the Gemorah points out (in the first perek of Messechet Shabbos) that the chumash clearly teaches us that it is improper for parents to have a favorite child, and the Torah clearly implies that all of the trouble surrounding mechiras Yosef and galus Mitzrayim came about because Yaakov Avinu treated Yosef differently than the other brothers.
Furthermore, our tradition has it that Bnei Yisroel are held to a higher standard than the umos ha'olam (see the midrash quoted by Rashi in Parshas Toldos on the possuk, "v'yitain lecho Elokim"). In general, one who is closer to Hashem has a greater degree of hashgocha protis both l'tav and l'mutov (good and bad); on the one hand the possuk tells us "raglei chassidov yishmor", i.e. that Hashem will protect one who is closer to Him in an unusual fashion; and on the other hand Hashem is m'dakdek im tzaddikov k'chut ha'saarah. For example, even with the ten explanations quoted by the Ohr Hachaim Hakaddosh we still don't know the exact nature of Moshe Rabbeinu's aveira which prevented him from entering Eretz Yisroel; all we know is that if anyone else would have done the same thing that Moshe Rabbeinu did, it probably would not have been considered an aveira; but since he was so much closer to Hashem he was held to a much higher standard.
So what does it actually mean when the Torah tells us that Am Yisroel is the am hanivchar? The simple understanding seems to be that Bnei Yisroel are obligated to serve as an ohr lagoyim - a light unto the nations, as the novi Yeshaya mentioned on several occasions. Even before yetzias Mitzrayim Hashem referred to Bnei Yisroel as "beni bechori - my first born child". Does that possuk mean to say that all the nations of the world are bonim lamokom and Bnei Yisroel is the first born? The mishna in Pirkei Avos clearly rejects this understanding and states that only Bnei Yisroel have the cherished status of bonim lamokom. Only the neshomos of Bnei Yisroel carry in their "spiritual DNA" the middos of elokus in a manner similar to children carrying the physical DNA of their parents. The neshomos of the umos ha'olam are fundamentally different, and as such the Zohar teaches us that when a nochri is misgayer it is literally true that ger sh'nisgayer k'koton sh'nolad domi because his old neshoma is replaced with a new one.
The notion of Bnei Yisroel being the first born, the bechor, means that just as a first born child is expected to help his parents raise their younger children, so too Bnei Yisroel are called upon to influence the other nations of the world. The avos, Avrohom, Yitzchok and Yaakov, were proactive in publicly preaching the lessons of monotheism. Apparently this charge was conveyed to Avrohom Avinu by Hashem when he told Avrohom, "V'nivrichu becha kol mishpichos ho'adoma" that all of the other families of the world should join along with you, just as one would graft a branch from one tree onto another (See Rashbam that the root of the word "v'nivrichu" is the word havracha, grafting).
After all of the shevotim were born, Yaakov Avinu understood that his responsibility to serve as an ohr lagoyim no longer required him to be proactive but should be fulfilled in a more passive fashion. Specifically, we can succeed in impressing upon all the nations of the world the values of honesty, integrity, and decency by acting properly ourselves and thus serving as a good example.
The Torah tells us in Parshas Ki Savo, "v'holachta bid'rachav" that we should preserve our tzelem Elokim by going in the ways of Hashem and then "when all of the nations of the world will see that you have succeeded in preserving your tzelem Elokim, they will learn from you how to act with yiras Shomayim" (see Aderes Eliyahu). The umos ha'olam also have tzelem Elokim and they can preserve that tzelem Elokim by following the ways of Hashem.
Hashem selected one nation to serve as a role model for all the others regarding how to go in His ways. The novi Yeshaya says, "am zu yotzarti", i.e. that the am ha'nivchar was a distinct creation of Hashem. According to nature, Klal Yisroel really should not exist, since the Chumash tells us that the imahos were akoros (unable to bear children), and the Talmud tells us (in Yevomos perek He'oreil) that Avrohom, Yitzchok, and Yaakov were akorim as well. As such, the whole existence of Klal Yisroel is l'maaleh min hatevah.
This probably explains the mysterious phenomenon of anti-Semitism which persists throughout all generations. A body naturally rejects foreign objects (and therefore when surgeons do an organ transplant they have to be concerned about the organ being rejected), and Klal Yisroel does not fit in to the natural system which makes up the rest of the world; Klal Yisroel was created as a separate yitzira which is l'maaleh min ha'teva. Thus we can understand quite well why all of the nations of the world, which are all part of teva, would naturally reject the "foreign body" of Klal Yisroel which does not fit in with the natural scheme of things!
We ought to cherish and appreciate the responsibility of being the am hanivchar, i.e. serving as the ohr lagoyim - the role model for all other nations.
Editor's note: for further discussion on the topic of Am Hanivchar by Rav Schachter see the following:
Are We Still the Am Hanivchar?
Am Hanivchar
The Temple and the Mikdash Me'at