"Do not be conformed to this world, but be transformed by the renewal of your mind, that by testing you may discern what is the will of God, what is good and acceptable and perfect."
How does one go about transforming their minds? How are they renewed? The key lies in the phrase "be transformed".
Be transformed is not an active, but a passive command. Fully written out, it means "Allow yourself to be transformed" rather than "transform yourself". You are not the one who does any transforming, but then who or what does?
The mind is a mirror to that which it sees. If all it sees is pornography, then the mind will be occupied with lust and sexual images. If all it takes in is violence, the imagination will turn violent. If a mind is occupied with video games, it will think of video games for the majority of its thoughts. The thought life is a reflection upon that which it reflects. It is transformed only by that which it sees, hears, tastes, touches, and smells.
And what if what the mind reflected was the one, true, and holy God who lives and breathes life into the dying, maker and sustainer of His creation, the way, the truth, and the life? The mind will be transformed by him. Its thoughts will be made alive and its imagination brimming with the will of God. The mind which dwells on God and his Word is holy because God is holy.