“However, this kind does not go out except by prayer and fasting.”
This is in response to a question from the disciples as to why they could not exorcise a demon out of a young man.
Fasting and prayer is a powerful combination. It is not a magic wand or a trump card to use on God when you want something.
Fasting an expression of humility before the Lord. You deny yourself of something essential to your life and food is one big essential.
Prayer is praising God and seeking His will in your life.
Demons cannot stand when you humbly represent Christ.
I can testify that fasting and prayer change you. It also changes those around you and not always in a pleasing way.
Paul was one such that fasted and prayed often.
When he rebuked the demon from a young woman in Philippi, they ended up in tortured and in prison. (Acts 16:16-24)
However, they changed a life for Christ and that is really the goal.