Our brain is a creation of God. It is so complex that the wisest of men cannot tell us how it really functions. The Bible says that believers are in spiritual warfare, the carnal against the spiritual.
"For the flesh lusteth against the Spirit, and the Spirit against the flesh: and these are contrary the one to the other: so that ye cannot do the things that ye would." (Galatians 5:17)
Ephesians 4:27 says, “Neither give place to the devil.”