Jesus said, "Blessed are the pure in heart, for they shall see God" (Matthew 5:8). Jesus is the One who changes hearts. He has been changing hearts for centuries. The One who spoke about being pure in heart, is the only One who can make your heart pure. To be pure in heart is to be blessed in Christ.
"For with the heart one believes unto righteousness" (Romans 10:10). Believing in the Lord Jesus Christ is trusting Him to do in us what we cannot do for ourselves, that is to be pure in heart. The righteousness of Christ is accounted to you by faith in Christ.
God's Spirit purifies the believer's heart based upon the sacrifice of Jesus Christ at the cross. "The blood of Jesus Christ His Son cleanses us from all sin" (1 John 1:7). There is no heart so sinful that Jesus cannot make pure. You may not be able to explain how Jesus purifies your heart, but the shed blood of Jesus cleanses believers from every sin.
The blood of Jesus, through the power of the Holy Spirit, continues to cleanse the hearts of believers. The goal is to sin not, but when a believer sins, fresh cleansing is available. Confession of sin to God in prayer brings cleansing. "If we confess our sins, He is faithful and just to forgive us our sins and to cleanse us from all unrighteousness" (1 John 1:9). To he pure in heart is to be cleansed in Christ.