Sin occurs because of two reasons:
You like doing the sinful activity, or
Satan has convinced you that you cannot defeat him and overcome the temptation.
You choose to sin as Satan can only suggest you do it. He cannot control you but you give him authority over you according to the degree you accept what He suggests.
I repeat, for you to sin you have to agree with what Satan is suggesting you do to sin
If Jesus is Lord of the area Satan is attacking this will not happen. This is why it is important for Jesus to be Lord of all your life so that you will reject what Satan suggests you do so that you will not sin.
How to respond to an attack
You can ignore the attack
The demons are still there attacking you
The attacks keep being repeated
The demons can be cast out in Jesus' Name
They can still return
The area can still be attacked by other demons
More worse demons can attack
Healing and restoration of any damage they did is not done
Better still is to use the five steps dealt with elsewhere on my web site:
The five steps gives the area attacked to Jesus, removes their right to use it against you and removes them from it.
Remember that any negative thought, emotion, feeling, imagination or anything that does not give your spirit peace is an attack of Satan. So what do you do?
Give it to Jesus to be Lord of it. You do not need to name the actual sin and can say ”what I am feeling”, “What I am thinking”, or "what Satan is suggesting I do or similar.
The tell the demons to go to Jesus in His Name to be dealt with by Him and take all they have done to you
Ask The Holy Spirit to take their place.
For example if you have a wrong thought:
In Jesus Name I command any demon behind the wrong thought I am having to go to the Lord Jesus and to take with him everything it has done or is doing to me and I ask you Holy Spirit to take their place.
Having sinful thoughts is not wrong if you reject them.
They come from Satan so are an attack
You are not an evil person if you have them as they did not originate from you
They are only wrong if you accept them and do what they suggest you do.
You are only an evil person if you delight to sin and do not want to reject the sinful thoughts
If you sin:
Tell God your sorry
Wholeheartedly try not to do the sin again
Use the five steps to give the area sinned in to Jesus.
Guilt, shame and condemnation now come from Satan
They were removed at Calvary along with the spiritual punishment of all sin repented of
The Holy Spirit will convict you but not make you feel guilty, ashamed or condemned
Deal with them as they are attack of Satan.
The Five steps in Summary
Give the matter, sin, situation, problem, proposed plans or activity to Jesus to be Lord of (along with the causes, results and associated matters)
Repent of any sin, forgive those who have hurt you
In Jesus Name command Satan to leave
In Jesus Name command healing and restoration on all they did to you
Ask The Holy Spirit to replace the demons that have gone.
Note there is no need to fight Satan, just a command for him to leave.