The Gemara in Masechet Kiddushin (31a) tells that Rav Huna son of Rav Yehoshua made a point of always keeping his head covered, and he explained that since the Shechina hovered over his head at all times, it is appropriate to cover one's head as a sign of respect. This same Rav Huna is cited elsewhere (Shabbat 118b) as saying that he was worthy of reward for ensuring never to walk four Amot (cubits) with his hair uncovered. In a different context (Shabbat 156b), the Gemara teaches that wearing a hair-covering helps engender Yir'at Shamayim (fear of Heaven) and thus prevent us from sin. It tells that a woman was warned by astrologers that her infant son would be a thief as an adult. She understood this to mean that the boy was born with a natural inclination toward theft. In an effort to avoid this outcome, she saw to it that the child's head would always remain covered, so he would be cognizant of Hashem's presence at all times and thus stay away from sin. In addition, she fervently prayed to G-d that he would be righteous. Once, the Gemara says, when this boy was still a child, he was sitting beneath somebody's palm tree learning Torah, and his head covering blew off. He looked up and saw a cluster of luscious dates. Enticed, he ate the dates, which were somebody's private property – showing how a head covering helps protect a person from the Yeser Ha'ra (evil inclination). (Thanks to his mother's efforts, though, this boy grew to become Rav Nahman Bar Yishak, one of the great Sages of the Talmud.) Similarly, the Zohar (Balak 187a) teaches that one must avoid walking more than four Amot with his head uncovered, because the Shechina hovers over his head. The Zohar adds that this concept is alluded to in the verse in Kohelet (9:8), "Ve'shemen Al Roshecha al Yehsar" – "Oil shall not be lacking upon your head." The Shechina (divine presence) is compared to fire, and Misvot are the "oil," the fuel that sustains its presence in our lives. Covering our heads brings us Yir'at Shamayim so that we remain loyal to G-d's commands. The Zohar reiterates this point later (Pinhas 245b), citing the verse, "Melo Kol Ha'aretz Kebodo" (Yeshayahu 6:3) – G-d's glory fills the entire earth. We acknowledge and give honor to His presence by wearing a head covering. The Rambam, too, in his Guide for the Perplexed (3:52), emphasizes that the great Sages always ensured to cover their heads out of respect for the divine presence. However, as we know, there are many otherwise observant Jews (especially in our community) who do not wear a Kippa all the time. They make a point of wearing a Kippa when they enter the synagogue, but not throughout the day when they go about their ordinary affairs. Is this acceptable, or are these individuals failing to fulfill a Halachic obligation? This question depends on whether we regard head-covering as a strict Halachic requirement, or as a Middat Hasidut – a recommended measure of piety. The Maharam of Rothenberg (Germany, c. 1215-1293), cited by the Orhot Haim and Kolbo, maintained that Halacha does not forbid going about bareheaded, and the Sages who ensured to have their heads covered did so as a Middat Hasidut. This is also the clear implication of the Rambam, in the passage cited earlier, where he mentions that great Rabbis made a point of covering their heads – indicating that this is a recommended measure of piety, and not a binding Halachic obligation. The Maharshal (Rav Shlomo Luria, Poland, 1510-1573) drew proof to this view from a passage in the Midrash which emphasizes how Hashem deals with us far more kindly than mortal kings deal with their subjects. Normally, the Midrash comments, when a king's messenger reads to the masses a written royal decree, everyone is expected to stand, remove their hats, and listen with fear and trepidation. But when we read the Shema in fulfillment of G-d's decree, we are not required to stand and remove our head coverings. The Midrash here clearly implies that there would be nothing wrong with baring our heads – even for the recitation of Shema. The Shebut Yaakov (Rav Yaakov Reischer, 1661-1733) refutes this proof, noting that the Midrash later observes that Hashem does not demand that we hunt wild animals to bring them as sacrifices, but rather commands that we offer as sacrifices domesticated animals, which do not need to be hunted. Clearly, this does not mean that it would be acceptable to offer wild animals as sacrifices. By the same token, we cannot necessarily deduce from the Midrash that it is acceptable to recite Shema with our heads uncovered. Maran (Rav Yosef Caro, author of the Shulhan Aruch), in Bet Yosef (91), brings the aforementioned opinion of the Maharam of Rothenberg, that covering one's head is not strictly required, indicating that he concurred with this view. Elsewhere in Bet Yosef (46), however, Maran appears to imply otherwise. In discussing the blessing recited each morning, "Oter Yisrael Be'tif'ara" ("He who crowns Israel with splendor"), Maran explains that we are "crowned" in the sense that we, unlike other nations, are required to cover our heads. Maran adds that even those who maintain that this is not strictly required, agree that it is recommended as an act of piety. Here Maran clearly sides with the opinion that head-covering constitutes an outright Halachic obligation. Regardless, the Hida (Rav Haim Yosef David Azulai, 1724-1806) noted that in the Shulhan Aruch, Maran takes the position that covering one's head is recommended but not strictly required. In Siman 2, the Shulhan Aruch writes that "it is forbidden" to walk about "Be'koma Zekufa" – completely upright, appearing proud and overly confident. In the same sentence, the Shulhan Aruch writes that "one should not walk four Amot with his head bare." When it comes to "Koma Zekufa," the Shulhan Aruch uses the word "Assur" ("It is forbidden"), whereas regarding walking bareheaded, he writes simply that this should not be done. It would thus appear that although it is proper to wear a head-covering, this is not strictly required. However, the Taz (Rav David Ha'levi Segal, 1586-1667) writes that even assuming that head-covering was practiced in ancient times only as a Middat Hasidut, in modern times this has become a strict Halachic obligation. The Taz explains that since the Christians are accustomed to walk about bareheaded, doing so violates the prohibition of "Hukot Ha'akum" – following gentile practices. Hence, in the view of the Taz, one is required to wear a Kippa nowadays in order to avoid transgressing the Biblical prohibition of "Hukot Ha'akum." Hacham Ovadia Yosef disputes this claim. Based on the comments of the Mahari Kolon (Rav Yosef Kolon, d. 1480), Hacham Ovadia writes that one transgresses the prohibition of "Hukot Ha'akum" only if he does something with the specific intention of imitating gentile practices and resembling a non-Jew. If a person decides to leave his head uncovered in the interest of comfort, this does not violate the prohibition. Nevertheless, in a famous responsum in Yehaveh Da'at, Hacham Ovadia writes that nowadays, one is required to wear a Kippa, for a different reason – because this has become the "badge" or symbol of an observant Jewish man. By wearing a Kippa, one identifies himself as a member of the population of G-d-fearing Jews. Conversely, one who chooses not to wear a Kippa presents himself as being non-observant, thereby inviting suspicion, and for this reason, wearing a Kippa has today become an obligation. It seems, however, that this applies only in Israel, where the decision of whether or not to cover one's head is the clear marker of one's self-identification as religious or secular. Here in the United States, however, at least in some communities, this is not the case, and it is known that not all observant Jews ensure to keep their heads covered at all times. Therefore, while it is certainly preferred and advisable to wear a Kippa – and where a person fears antisemitism, he can wear a cap instead of, or over, his Kippa – one who wishes to leave his head uncovered has a basis on which to rely. (Indeed, in the school where I work, I advise the members of the basketball team to leave their Kippot off during games, because the Kippa would interfere with their playing; since the Kippa is not required as a strict obligation, it may certainly be removed for this purpose.) Nevertheless, wearing a Kippa when eating, praying, reciting Berachot and learning Torah is strictly required. Of course, one must wear a Kippa in the synagogue. In the presence of a Rabbi, it is proper to wear a Kippa in the interest of Derech Eretz (common courtesy). When a person wishes to fulfill the requirement of a Beracha by listening to its recitation by somebody else, he must wear a Kippa even though he remains silent, because he is considered as actually reciting the Beracha by listening to his fellow.