The Bible reveals the attributes of God. One of these is holiness or purity. God is without sin, which makes it holy and pure. Christians are encouraged to be pure and holy as well. But if humans are sinful, how can we attain purity?
In the context of humanity, purity does not mean perfect holiness. It is a constant desire to stay pure and undefiled from the sinful effects of the world. While no human can fully succeed in this, it is the desire to stay pure that God wants us to have.
Because of this, anyone who wants to be pure before God must stay in a close relationship with Him. This includes prayer, Bible reading, and carefully obeying His commandments. All of these can help him stay pure in this world.