As I have explained many time and not that I am the authority. When faith is placed in the work of the cross, that gives the Holy Spirit the legal right to work in us and through us, which produces fruit and not that of our own. When place faith in Christ we yield to Holy Spirit Just like the prophets of old the only difference is that the Holy Spirit would come upon them to perform certain task and then leave. With our new covenant, based in the blood of Christ, The Holy Spirit can reside with us 24\7 as long as our faith is in the finished work of Christ. That doe's not make us perfect, will still do and think and say wrong things, but because our faith is in the right place The Holy Spirit does not leave us but teaches us.
Again and again and again. It is not by might nor by power, but by My Spirit saith the Lord and if we follow the Spirit we will have good fruit or works, because any branch that does not produce good fruit is pruned and cast into the fire.