While our mind is cruising from thought to thought we may be confronted with a situation that draws our attention. We begin to question about the nature of this oncoming encounter. It could be toward one we hate or one we love. If its one who has harmed or wronged us in the past, some feeling of dislike or anger or even revenge may rise in our thoughts. It is at this point that we have to reject the thoughts forcefully before we are led to an action dictated by our passion.
A sin begins with our attention being gathered in a way that leads to a feeling and then a desire. Then, if we hold onto this desire we begin to think of ways to act to satisfy it. If it is a feeling of lust, we may have a desire for sexual relations to satisfy our desire for the pleasure of such an act. We will begin think about how we can take actions that will satisfy our sexual hunger, our desire for personal pleasure. There may even be along period where we figure out how to accomplish this. We are already in a state of sin. Holding on tho this desire we lose our freedom and eventually we will act. The desire wins even when we know that this act goes against the way God intends for us to act. Finally, we will have to deal with the guilt associated with such an action.
The solution is to immediately drive out the passionate thought the moment our attention is drawn to the object that engenders passionate desires.
Here is the advice from Saint Theophan:
If you immediately drive away the passionate thought, then you put an end to the entire struggle. There will be neither feeling, and even more, there will be no desire. Make the decision to act in this way.... If the feeling begins to stir involuntarily along with the thought, immediately chase out the feeling with the thought... The moment you discover a passionate impulse within yourself, chase it out. Make this your rule: Do not voluntarily praise either passionate thought, feeling or desire, and immediately chase them away with complete hatred as soon as you detect them. You will always be innocent before God and before your own conscience.... You will carry out the act of purification (cleansing), laboring diligently at the purifying of your soul.This is not that difficult to do. You must first have a firm faith which gives you the motivation to discipline your mind. The more you keep God in your mind the more likely you will be able to interact to reject such feelings. This is why a life of prayer, fasting and repentance is so important. It leads us to this purification where we learn how to control our mind's activity and to routinely root out our tendency to lock in on our desires without constraint. With a disciplined mind we are liberated from any control by passions and remove what blocks us from God.
Reference: The Spiritual Life, pp 237-243