There are all kinds of ways to fast. You can have nothing but liquids for 7 days. You can eschew all forms of sugar and other “sweet meats” as Daniel did. You can decide to eat only one meal a day or only eat before and after sunset. Whatever you choose to do – make sure it is a genuine sacrifice.
A fast is designed as an “act of worship”. It’s NOT designed to manipulate God or try to control the outcome of a situation or circumstance. Instead, as an act of worship, it is a means of demonstrating to God the sincerity of our request, ALWAYS saying “nevertheless, Lord God, not my will but yours be done in this situation.” Fasting reminds us that all we have comes from God. As an act of worship it pleases God.