The first mention of bread on Shabbat comes from the Torah, when the Israelites were wandering in the wilderness and collected manna, which fell down from the sky through God's doing. On Fridays, they were commanded to bring in a double portion so that they would not gather manna on Shabbat.
וַיֹּ֤אמֶר ה' אֶל־מֹשֶׁ֔ה הִנְנִ֨י מַמְטִ֥יר לָכֶ֛ם לֶ֖חֶם מִן־הַשָּׁמָ֑יִם וְיָצָ֨א הָעָ֤ם וְלָֽקְטוּ֙ דְּבַר־י֣וֹם בְּיוֹמ֔וֹ לְמַ֧עַן אֲנַסֶּ֛נּוּ הֲיֵלֵ֥ךְ בְּתוֹרָתִ֖י אִם־לֹֽא׃ וְהָיָה֙ בַּיּ֣וֹם הַשִּׁשִּׁ֔י וְהֵכִ֖ינוּ אֵ֣ת אֲשֶׁר־יָבִ֑יאוּ וְהָיָ֣ה מִשְׁנֶ֔ה עַ֥ל אֲשֶֽׁר־יִלְקְט֖וּ י֥וֹם ׀ יֽוֹם׃
And the LORD said to Moses, “I will rain down bread for you from the sky, and the people shall go out and gather each day that day’s portion—that I may test them, to see whether they will follow My instructions or not. But on the sixth day, they shall bring in double the amount they gather each day.”
וַיְהִ֣י ׀ בַּיּ֣וֹם הַשִּׁשִּׁ֗י לָֽקְט֥וּ לֶ֙חֶם֙ מִשְׁנֶ֔ה שְׁנֵ֥י הָעֹ֖מֶר לָאֶחָ֑ד
On the sixth day they gathered double the amount of food, two portions for each person;
Of course, just gathering a double portion isn't enough to carry on a tradition. In the times of the Temple, we were commanded to take part of our crops and give a the first portion to God and the Kohanim as a sacrifice. The Torah also tells us that we also have to give the first parts of our baking, too.
Speak to the Israelite people and say to them, "When you enter the land to which I am taking you and you eat of the bread of the land, you shall set some aside as a gift to the LORD: as the first yield of your baking, you shall set aside a loaf as a gift; you shall set it aside as a gift like the gift from the threshing floor. You shall make a gift to the LORD from the first yield of your baking, throughout the ages."
In modern times, we still symbolically take part of our dough as a sacrifice. That's what's actually called "challah." There's a special blessing for the action, and, we're required to do it if we're making bread with more than about 2 or 3 pounds of dough, depending on whose interpretations we follow. When we "take challah," we pull off about an olive-sized piece of dough and burn it in the oven or in a fire after we say the blessing below. Some people wrap it in tinfoil and put it on the bottom of the oven.
"Taking challah" isn't just a mitzvah for when we're making bread for Shabbat. In fact, we're supposed to take challah for any kind of bread we make if it uses one of the 5 bread grains listed below.
עִסָּה מֵחֲמֵשֶׁת מִינֵי דָּגָן חַיֶּבֶת בְּחַלָּה. קֹדֶם שֶׁמַּפְרִישִׁין הַחַלָּה מְבָרְכִין, בָּרוּךְ אַתָּה ה' אֱלֹקֵינוּ מֶלֶךְ הָעוֹלָם אֲשֶׁר קִדְּשָׁנוּ בְּמִצְוֹתָיו וְצִוָנוּ לְהַפְרִישׁ חַלָּה. וְנוֹטְלִין כַּזַּיִת מִן הָעִסָּה וְשׂוֹרְפִין אוֹתָהּ בָּאֵשׁ. וְהַמִּנְהָג לְשָׂרְפָהּ בַּתַנוּר שֶׁיֹּאפוּ שָׁם אֶת הַלֶּחֶם (שכ"ב שכ"ד שכ"ח).
Dough which is made of the five grains (wheat, barley, spelt, rye and oats) require the separation of challah. Before separating challah the following blessing is said: Praised are you, Lord our God, Sovereign of the universe, who has made us holy through Your mitzvot and has commanded us to separate the challah. A piece of dough of size of an olive is then taken and burned in fire. The custom is to burn it in the oven in which the bread will be baked.
Trivia Question: Those 5 grains are a specific category of food that relates back to another holiday on the Jewish calendar. Do you know which holiday it is, and why those grains are important?
Now that we know what "challah" actually is, why do we have to have two of them, and why does it matter that we have challah at all?
אָמַר רַבִּי אַבָּא: בְּשַׁבָּת חַיָּיב אָדָם לִבְצוֹעַ עַל שְׁתֵּי כִכָּרוֹת, דִּכְתִיב: ״לֶחֶם מִשְׁנֶה״.
Rabbi Abba said: On Shabbat a person is obligated to break bread in their meal over two loaves of bread, as it is written: “And it happened on the sixth day, they collected double the bread, two portions for each one” (Exodus 16:22).
Saying "HaMotzi," the blessing over the bread, is what officially starts a meal, In fact, it's not considered a real "meal" unless there is bread. (Otherwise, it's just a snack.)
אָמַר רַב יְהוּדָה בְּרֵיהּ דְּרַב שְׁמוּאֵל בַּר שִׁילַת מִשְּׁמֵיהּ דְּרַב: אֵין הַמְסוּבִּין רַשָּׁאִין לֶאֱכוֹל כְּלוּם עַד שֶׁיִּטְעוֹם הַבּוֹצֵעַ.
Rav Yehuda, son of Rav Shmuel bar Sheilat, said in the name of Rav: Those reclining at a meal may not eat anything until the one breaking bread [saying the blessing] has tasted/eaten the bread.
חַיָּב אָדָם לֶאֱכל שָׁלֹשׁ סְעֻדּוֹת בְּשַׁבָּת אַחַת עַרְבִית וְאַחַת שַׁחֲרִית וְאַחַת בְּמִנְחָה. וְצָרִיךְ לְהִזָּהֵר בְּשָׁלֹשׁ סְעֵדּוֹת אֵלּוּ שֶׁלֹּא יִפְחֹת מֵהֶן כְּלָל. וַאֲפִלּוּ עָנִי הַמִּתְפַּרְנֵס מִן הַצְּדָקָה סוֹעֵד שָׁלֹשׁ סְעֵדּוֹת.וְצָרִיךְ לִקְבֹּעַ כָּל סְעֻדָּה מִשְּׁלָשְׁתָּן עַל הַיַּיִן וְלִבְצֹעַ עַל שְׁתֵּי כִּכָּרוֹת. וְכֵן בְּיָמִים טוֹבִים:
One should eat three meals on Shabbat: one in the evening, one in the morning, and one in the afternoon. And one must be careful with these three meals, to not lessen from them at all. And even a poor person who is supported by charity must eat three meals....And one is required to base each meal of the three on wine and to break bread on two loaves. And likewise on holidays.