Spiritual fasting, not practiced for health reason, can come alongside other practices like prayer, scripture, silence, worship, or discernment (Acts 13:1-3).
Fasting is primarily refraining from food from 1 to 3 days, always including water. Ideally a fast would last for 24 hours, e.g. from after dinner on Tuesday, breaking the fast with dinner on Wednesday. However, one can start by fasting until noon or 3PM or perhaps starting with a one meal fast.
If you are prompted to fast for one day (periodic) in response to a crisis or circumstance, choose the day including the start and finish. Be prayerful about the situation, including scripture to help you understand God's heart towards it, and perhaps journal to record anything (especially if you fasted for discernment).
If you are prompted to fast regularly, then choose a day you can commit to weekly. Drink water through your fast. Set aside the time you will gain from not eating or preparing towards prayer, worship, scripture, or silence. Make it consistent for a season before you give up or pause. Spiritual formation is slow and deep cumulative work, yet it is always a means of grace. Do not fast for a silver bullet boost in your life, but a hunger for God - his presence, perspective, purposes and power.
Allow God to examine your heart and life, perhaps praying through Psalm 139:23-24.
“Fasting gives birth to prophets, she strengthens the powerful; fasting makes lawgivers wise. She is a safeguard for the soul, a steadfast companion for the body, a weapon for the brave, and a discipline for champions. Fasting repels temptations, anoints for godliness. She is a companion for sobriety, the crafter of a sound mind. In wars she fights bravely, in peace she teaches tranquility.”
—ST. BASIL THE GREAT (A.D. 330-379)