We must realize that thoughts can come from 2 different sources. This means that the thoughts that come into our minds to influence our will, emotions, and intellect do not originate in our minds. This is very important because it changes your perspective on what we ought to be focusing on.
The devil puts many thoughts in our minds from outside ourselves. The thoughts from God come from within us. From our spirit to mind. The key is to discern the source of our thoughts.
Consistent prayer centered around absolute surrender and Consistent meditation on the Word of God is the key to distinguishing the source of our thoughts.
Hebrews 4:14