Here’s the deal: Rosh Hashanah is the Jewish New Year, the first day of the month of Tishrei. It is a celebration with delicious festive meals (and, for Sephardic Jews, a special seder) that include apples dipped in honey and round challahs studded with raisins, foods symbolizing a wish for sweetness in the new year.
But Rosh Hashanah is also a time of solemnity, inaugurating ten days of atonement. During this time, Jews take accounting of their own behavior, and work to be better people in the new year. That’s why a big part of Rosh Hashanah is praying in synagogue.
The process of spiritual reflection and growth that begins on Rosh Hashanah culminates ten days later on Yom Kippur, the Day of Atonement. On this day, Jews come together to repent for the sins of the previous year and pledge themselves to do better. It is a day of reflection and holiness, and so that they are not distracted from the task, Jews fast. During Yom Kippur, Jews do not eat or drink for a full 25 hours. This creates a sense of focus, urgency, and solemnity.
Yom Kippur isn’t the only fast day on the Jewish calendar — just the most well-known. The other major fast is on Tisha B’Av. There are also sevearl other minor fasts, including Tzom Gedaliah, a daylight-only fast (i.e. not a full 25 hours) which takes place on the 3rd of Tishrei, between Rosh Hashanah and Yom Kippur.