Imagine I buy a treadmill to lose some weight. Three months later I take it back to the store and complain to the clerk that it didn't work-- I didn't lose a pound. He asks me, "What is the problem? Did it not work properly?" I respond, "I don't know if it works. I never ran on it. I just know I didn't lose any weight, so I am done with it!"
This may seem like a silly example, but change the details and suddenly it sounds pretty familiar:
"I have prayed for the Holy Spirit to free me from my lust, and I am still addicted to pornography." Or, "I have prayer for years to be able to forgive my dad, but I am still racked with anger and bitterness thirty years down the road." "I have prayed for years to be free of my gluttony, but despite prayer, spiritually based support groups, and dieting, I am still a compulsive, unhealthy eater." Fill in whatever sin plagues you and suddenly the treadmill illustration doesn't seem so silly. In fact, it seems like those prayers for freedom from that ongoing sin didn't really "work" in much the same way the treadmill didn't help me lose weight.
Receiving freedom and healing in answer to prayer is generally not something that is done to you, a situation in which you are just a passive participant. Occasionally God works this way and simply heals or frees a person outright. He is certainly capable of this. But in my experience, He typically asks us to play an active role in the journey toward wholeness. He doesn't need our help but invites us to participate. Often this journey to freedom takes time, sometimes a very long time. And it takes perseverance. It takes participation on our part. We have to get on the treadmill and run-- merely looking at the workout machine doesn't do a whole lot. (See also Rom. 12:11 "Do not be slothful in zeal, be fervent in spirit, serve the Lord." and 1 Thess. 5:19 "Do not quench the Spirit.")