You need to realize that as a child of God who is seated with Christ in the heavenly places, you have the authority to resist the devil as you submit to God (Eph 2:6, James 4:7, Matt. 10:1). As a child of God, you are armed with weapons not of this world—weapons that have divine power to demolish strongholds and any argument or suggestion that is contrary to the knowledge of God (2 Cor. 10).Here’s an example. You have been up late studying for a test the next day. As you lie in bed, the thought comes into your mind: “I would sleep a lot better if I looked at porn and masturbated right now.” The source of the thought is dubious; maybe it’s your flesh, maybe you are recalling a sexy image from TV, maybe it is entirely demonic. Really, the source doesn’t matter. The thought is contrary to the knowledge of God, so you need to take it captive and make it obedient to Christ. So you pray (out loud): “In Jesus’ name, I reject (name the lustful thought) and the temptation to lust right now. I am a child of God, and the evil one can’t touch me” (1 John 5:18). Now the thought is captive. That means, out of the fight.