(32) It is a complete day of rest for you, and you shall afflict yourselves. On the ninth of the month in the evening, from evening to evening, you shall observe your rest day.
ועניתם את נפשותיכם בתשעה וכי בתשעה מתענין והלא בעשור מתענין אלא לומר לך כל האוכל ושותה בתשיעי מעלה עליו הכתוב כאילו התענה תשיעי ועשירי
‘And you shall afflict your souls in the ninth [day of the month]’. But is one fasting on the ninth? Do we not fast on the tenth? Rather, it comes to indicate that, if one eats and drinks on the ninth, Scripture accounts it to him as if he had fasted on the ninth and the tenth.
כל האוכל ושותה וכו' - והכי משמע קרא ועניתם בתשעה כלומר התקן עצמך בתשעה שתוכל להתענות בעשרה ומדאפקיה קרא בלשון עינוי לומר לך הרי הוא כאלו מתענה בתשעה:
All who eat and drink, etc. - And this is what the passuk means. Afflict yourselves on the ninth, in other words, prepare yourself on the ninth so that you will be able to fast on the tenth. And the passuk uses the language of "afflicting" to tell you that it is as if you are fasting on the ninth.
תוספות הרא"ש יומא דף פא עמוד ב
מעלה עליו הכתוב כאילו התענה תשיעי ועשירי. ונצטוה לכך, אבל עכשיו שלא נצטוה אסור להתענות
Tosfot HaRosh on Yoma 81b
The passuk attributes to you as if you fasted on the ninth and tenth. And it is commanded to you, and now that it is commanded, it is forbidden to fast (on the ninth).
רא"ש מסכת יומא פרק ח סימן כב
...והכי פירושו דקרא ועניתם את נפשותיכם. כלומר הכינו עצמכם בתשעה לחדש להתחזק באכילה ובשתיה כדי שתוכלו להתענות למחר להראות חיבתו של המקום ברוך הוא לישראל. כאדם שיש לו ילד שעשועים וגזר עליו להתענות יום אחד וצוה להאכילו ולהשקותו ערב יום התענית כדי שיוכל לסבול כך הקב"ה מכל ימות השנה לא צוה לישראל להתענות אלא יום אחד לטובתן לכפר על עונותם והזהירם לאכול ולשתות ערב התענית ומאחר שהוציא אותה אכילה ושתיה בלשון עינוי אלמא חשיבא היא כעינוי וכאילו נצטוו על עינוי של תשיעי ועשירי
RoSh on Yoma Chapter 8 Sign 22
...And this is the explanation of the verse "afflict yourselves" .
In other words, prepare yourselves on the ninth of the month by strengthening yourselves through eating and drinking in order to fast the next day. This is to show the love of Hashem for Israel. It is like a person who has a kid who lives a life of pleasure and the parent decreed on them to fast one day and commanded them to eat and drink before the day of the fast in order to endure the fast. This is what Hashem has done. He only commanded Israel to fast one day a year for their betterment, to atone for their sins, and warned them to eat and drink on the eve of the fast, and from the learning of the eating and drinking from the language of "affliction", therefore it is considered like he was afflicting, and it is like he was commanded on the ninth and tenth.