Fasting means you can not eat between meals. Like after you have breakfast lunch and dinner you can not have snacks in between.
It means not eating for a period of time in fact that's where the word breakfast came from you don't eat when you sleep (fast) so when you wake up and eat you Break-fast
Fast is abstinence from all food for a limited period of time. In the bible rightly motivated fasts was to show godly sorrow and repentance over fast sins. (Jonah 3:5) Fasting were also done when one was in the face of great danger, when in sore need of divine guidance, while enduring tests and meeting temptations, or when studying, meditating, or concentrating on God’s purposes. (2Chronicles 20:3; Ezra 8:21; Esther 4:3, 16; Matthew 4:1, 2)