I had a friend ask today, why does Sin keep us from God? So I wanted to give the simplest example I could to illustrate exactly that.
Most people alive today have studied magnets. They understand that when a magnet is facing the same direction, as in the first image, they attract each other. But when you turn one magnet around and they are facing different directions, they repel. God is holy, that means He has no sin whatsoever. He can't touch sin, and sin can't go near Him. When we fill our life full of sin, it's like turning the magnet around. God is always facing good, He never turns to sin. So when we turn towards Sin we begin to repel God.
You see God hasn't changed at all. He's still there facing the same direction He always has. It's us who have moved. We turned from God to Sin. When we did that we are no longer aligned with God and we are separating ourselves from Him. Not because He wants us to, not because He has changed, but because we choose to place a barrier between us. Like a wall. We are repelling ourselves from God because Sin repels from God.
How do we fix that? What can we do to become clean again? How can we again orient our lives? It's a very simple step. We turn to Jesus. Jesus has already bridged the gap. We become obedient to Him out of our love. We go back to God in prayer and in heart! By reorienting our lives we start being attracted to God again who never changed. He starts pulling at us again. But theres still that wall... Jesus tears it down! He cleans the sin out of us and makes us Holy too. Then we can walk across the bridge that He has built, and into God's arms again.