The practice of fasting goes back to the biblical verse in Leviticus 26:27, which instructs the people of Israel to "afflict their souls" on Yom Kippur. The rabbis interpreted this passage as a commandment to fast. They also thought that it meant that we should refrain from luxuries on Yom Kippur, and listed wearing leather shoes and jewelry, bathing, anointing oneself with lotions or perfumes, and sex, as things from which we should particularly abstain. Often, those who cannot fast on Yom Kippur will refrain from the other things on this list. Some feel that refraining from food or luxuries helps them better focus on the meaning of the day.
The Eternal One spoke to Moses, saying, "Phinehas, son of Eleazar son of Aaron the priest, has turned back My wrath from the Israelites by displaying among them his passion for Me, so that I did not wipe out the Israelite people in My passion." - Numbers 25:10-11