Thousands were in Jerusalem for this festival. When the Spirit of God was given to the disciples that morning, Peter then preached the first inspired sermon for the Christian church. Thousands were convicted in their hearts, having realized the fruitlessness of their past lives and realizing that Christ was and is the Savior.
Peter spelled out, in no uncertain terms, that there are two conditions. Those two conditions are the same that Jesus spelled out at the beginning of His Gospel—repent and believe. No one can be rightly baptized unless he believes.
Once these conditions are complied with, God stands bound by a promise to put within the repentant believer His Spirit. Then, many of His attributes begin to be imparted to us. His love, faith, understanding, goodness, and power—the power to develop the very same things that make up who He is and how He thinks and acts begin to be made available to those who God calls and gives His Spirit of a sound mind to.
This is the beginning of eternal life, and the very character of God. The Holy Spirit in a person changes that person. If there is no change in the person after baptism and the receipt of the Holy Spirit, then that person was most likely just dunked.
You do not join a church. God calls you into His church. Water baptism is required for those God calls to begin the process of conversion and salvation.
In the first inspired sermon, after the Holy Spirit came to convert Peter and the apostles, Peter commanded all to repent, and to be baptized.
The command is, "Repent, and be baptized"—and then, "you shall receive the gift of the Holy Spirit."