You decide concretely and purposely to stop doing something for a reason greater than your own temporary desires and wants. Then pray. It is just that simple. The ego and the enemy make it difficult and seem complicated, and of course you have to have derived some temporary pleasure out of the sinful behavior or you wouldn’t still be doing it. You have to want to please and obey God more than yourself. That is it. God always makes it simple. The hardest thing is taming the ego. You can do it. God can help.