Right from time God has always been with man. The first time that man became separated from God was in Genesis and the reason behind it was sin. Sin can stand in between Man and God. GOD told us that if we draw near to him He will draw near to us. But when we begin to work against the will of God we begin to distant ourselves from God.
God was not the one who distance himself from us rather we were the one who drew away from Him by reason of our sin and rebelliousness. When we feel that we are far away from God we should come to repentance with a sincere heart. God said in his word in the book of Chronicles that if those who are called by His name shall humble themselves and come before him and call on his name that He shall show them mercy and heal their land and forget their sins.
For us to reconnect back to God and restore our relationship with Him we need to go before Him, call upon Him and turn from our evil ways. By doing so we are assured that He will draw back to us. Being far away from God places us at risk because God is the source of our lives. When we draw far away from God that means we are drawing far away from our Source and we can only do little or nothing without God who we originated from