James 4:7-8 Submit yourselves therefore to God. Resist the devil, and he will flee from you. Draw nigh to God, and he will draw nigh to you.
We are to be submitted to God ... the words "submit yourselves" are translated from the Greek word hypotassō from 5259 /hypó, "under" and 5021 /tássō, "arrange") – properly, "under God's arrangement," i.e. submitting to the Lord
We are to resist ... Greek anthistēmi (from 473 /antí, "opposite/against" and 2476 /hístēmi, "to stand") – properly, take a complete stand against, i.e. a "180 degree, contrary position"; (figuratively) to establish one's position publicly by conspicuously "holding one's ground," i.e. refusing to be moved ("pushed back")
When we are submitted to God, we draw near to Him and He draws near to us. Then, when we find ourselves in the position where we must steadfastly resist, we are strengthened from within as God works in us to perfect, establish, strengthen and settle us ... see 1 Peter 5:6-11 to see how God works within us as we endure the suffering of this present time ... standing against the devil as he seeks to devour.