There is an element of mystery in this relationship, because Scripture teaches that God is sovereign over all things, but it also teaches that man has a will. Lots of people reason that if man has a will, then it must be a free will; but Scripture doesn’t actually teach this.
Man has a responsible will. Man has the responsibility to exercise his will as God directs him in His revealed Word. We also know that God has a hidden will that He keeps to Himself. This is His sovereign will by which He directs and accomplishes all things. He is able to do this without violating the will of man.
Again, it’s not as if man has a free will in this process. Those who have not been regenerated by the Spirit of God are bound and captivated by sin. They can exercise their will, but it leads them only to choose sin in opposition to God. So God in His sovereignty either leaves the non-elect to this decision which they pursue according to their will, or God regenerates and enlivens the will. As Augustine said, God stretches the will out from being turned in on itself to being related to God. So God does remain sovereign, but man never becomes just a beast or a machine in the presence of God.