It is a mitzva to fast on Yom Kippur. This fast is connected to atonement for sins, as we read:
And this shall be to you a law for all time: In the seventh month, on the tenth day of the month, you shall deprive yourselves; and you shall do no manner of work, neither the citizen nor the stranger who resides among you. For on this day, atonement shall be made for you to purify you of all your sins; you shall purify yourselves before the Lord. (Vayikra 16:29-30)
A question arises. If the Torah wanted to establish a day for repentance and atonement, wouldn’t it have made more sense to allow us to eat and drink a little, so that we would be clear-headed and able to concentrate on prayer and repentance?
In fact, however, fasting discloses something deeper. Throughout the year, the soul is enveloped by a cloak of physicality, of various bodily desires, which make people forget their inner aspirations and sin. God commanded us to fast on Yom Kippur so that our soul can disconnect itself somewhat from the bonds of the body and materiality, thus allowing its true, noble aspirations to be free and to express themselves. Through this sublime connection to the root of our souls, our sins fall away and are cast into Azazel (Derekh Hashem 4:8:5).
True, fasting and the other deprivations make it harder for us to focus. However, they allow us to come to the profound realization that our true desire is to cling to God. Deep down, we want to improve the world by following the Torah’s instructions and living by its light. This leads to a higher quality of repentance, each person on his own level.
Therefore, even if one needs to lie down in order to continue fasting, he should not be discouraged, because he has internalized the most basic element of Yom Kippur. Even while lying in bed, he can think about self-improvement and resolve to increase his Torah study, his mitzva observance, and his commitment to his family.
Fasting also serves a purpose akin to that of sacrifice. During Temple times, when a person offered an animal sacrifice, its blood and fat were burnt on the altar, bringing him atonement. Likewise, when we fast on Yom Kippur, our blood and fat, which decrease with the fast, bring us atonement. We should therefore imagine that we are sacrificing ourselves on the altar. Our blood and fat decrease, ascend to God as a sweet-smelling fragrance, and atone for us. Thus, one ascends to the highest level, beyond thought and comprehension, where there is only the desire for and simple awareness of doing the will of our Father in heaven. (See Berakhot 17a; Recanati, Vayikra 16:29; Zohar Ḥadash, Ruth 80a.)
In one sense, Shabbat is holier than Yom Kippur. The punishment for doing melakha on Shabbat is stoning, while on Yom Kippur it is “only” the less severe karet. Additionally, on Shabbat seven people are called up to the Torah, while on Yom Kippur only six are (Megilla 22b). This higher level of holiness is because Shabbat unites the body and soul, revealing the holiness of both. On the other hand, in a certain sense Yom Kippur is more spiritual, as we abstain then from all physical pleasures. Not only that, but even if Yom Kippur is on Shabbat we still fast, as fasting is necessary to achieve atonement for the Jewish people.
The kabbalists speak of two perspectives as well. On the one hand, Yom Kippur is a manifestation of the sefira of bina, from which repentance and freedom flow. This sefira is close to the seven lower sefirot, and they draw upon it for atonement and forgiveness (Sha’arei Ora, Sha’ar 8). Shabbat is a manifestation of the higher sefira of ḥokhma, through which divine unity, whose holiness is expressed in body and soul together, is revealed in the world. On the other hand, Yom Kippur is rooted in the sefira of keter, which expresses the supernal divine will, the foundation of the covenant between God and Israel. Accordingly, Yom Kippur is the day of the soul, with the power to purify and to atone for sins, which stem from the physical. In the words of Shlah (citing Tola’at Ya’akov, Sitrei Yom Ha-kippurim): “Yom Kippur is the day when the supernal light is revealed [alluding to the higher sefira of keter, which shines upon and exerts influence over everyone, and becomes known through bina…] from which all other luminaries shine, and this is the secret of the next world…” (Shlah, Masekhet Yoma, Torah Or §138). Based on this, the punishment for desecrating Yom Kippur should be more severe than for desecrating Shabbat. Nevertheless, since Yom Kippur is when the supernal light is revealed and washes clean the sins of Israel, its punishment reflects mercy as well (Magid Meisharim cited by Shlah, ibid.).