According to Torah law, even if Rosh Ha-shana is on Shabbat the shofar is blown. However, the Sages ordained that the shofar is not blown on Shabbat, because while everyone is obligated in shofar, not everyone is knowledgeable about the laws pertaining to carrying in the public domain. The Sages were concerned that people who did not know how to blow the shofar might take one to an expert to teach them. If they were to carry the shofar four amot within the public domain, they would transgress the Torah prohibition of carrying on Shabbat (Rosh Ha-shana 29b; SA 588:5).
Nevertheless, in the Temple they blew the shofar even on Shabbat, as rabbinic ordinances did not apply within the Temple. In fact, they blew in Jerusalem and its environs as well as long as the Sanhedrin was situated there, because due to the influence of the court, residents of Jerusalem and its environs were careful to avoid carrying on Shabbat (MT, Laws of Shofar 2:8-9).
Although the ordinance to refrain from blowing the shofar on Rosh Ha-shana on Shabbat is rabbinic, the Torah alludes to it: One verse says, “a day of blasts (yom teru’a)” (Bamidbar 29:1), while another says, “a sacred occasion commemorated with loud blasts (zikhron teru’a)” (Vayikra 23:24). The Gemara explains that when Rosh Ha-shana is on a weekday it is a day of teru’a, while when it is on Shabbat it is a commemoration (zikhron) of teru’a, when we mention the teru’a without actually sounding the blasts (Rosh Ha-shana 29b).
Kabbalists explain that when Rosh Ha-shana is on Shabbat, blowing the shofar is not necessary because the holiness normally achieved by blowing the shofar on Rosh Ha-shana is largely achieved on Shabbat by virtue of its intrinsic holiness. True, shofar blasts would add even more holiness, but on such an exalted plane that it would be almost impossible for us to perceive or absorb it. However, in the place of the Temple and Sanhedrin, people were able to absorb it. Therefore, in those places the shofar was blown even on Shabbat (R. Shneur Zalman of Liadi, Likutei Torah, Devarim 56ff).
. As stated above, according to Torah law the shofar is blown on Rosh Ha-shana even on Shabbat (Rosh Ha-shana 29b). True, playing musical instruments on Shabbat is prohibited rabbinically, and this prohibition includes blowing the shofar (Peninei Halakha: Shabbat 22:17), but this rabbinic prohibition cannot supersede a Torah commandment. Rather, the reason that blowing the shofar on Shabbat is prohibited is because the Sages were worried that people would carry the shofar in the public domain. This is also why a lulav is not taken on the first day of Sukkot if it is on Shabbat, and why the megilla is not read on Purim if it is on Shabbat. See MT, Laws of Shofar 2:6.
In contrast, the Yerushalmi (Rosh Ha-shana 4:1) maintains that according to the Torah itself the shofar is not blown on Shabbat, i.e., that the derivation from the verses is not a mere allusion but a bona fide inference. The Yerushalmi then asks how they could blow the shofar in the Temple and answers (based on a close reading of the verses) that wherever people know exactly when the first of the month is and they offer the daily sacrifice, they blow the shofar even on Shabbat. Additionally, it offers a derivation from what is said regarding the Jubilee year, “Then you shall sound the horn loud; in the seventh month, on the tenth day of the month – the Day of Atonement – you shall have the horn sounded throughout your land” (Vayikra 25:9). We see that it is specifically on Yom Kippur that a shofar is blown throughout the land. In contrast, if Rosh Ha-shana is on Shabbat, the shofar is blown only at the Sanhedrin. This answer also appears in Sifra, Behar §2.
It should be noted that in the Rosh Ha-shana prayers we refer to the day as yom teru’a when it is on a weekday, and as zikhron teru’a when it is on Shabbat (SA 582:7). This is opposed to Seder R. Amram Gaon, Rambam, and other Rishonim, who maintain that yom teru’a is always said.