So what does the Apostle Peter mean when he says “repent and be baptized” in Acts 2:38? Peter has just finished explaining to this great assembly what took place back at the beginning of this chapter, which is the event known as the Pentecost. Let’s see what took place:
Acts 2:1-8 And when the day of Pentecost was fully come, they were all with one accord in one place. (2) And suddenly there came a sound from heaven as of a rushing mighty wind, and it filled all the house where they were sitting. (3) And there appeared unto them cloven tongues like as of fire, and it sat upon each of them. (4) And they were all filled with the Holy Ghost, and began to speak with other tongues, as the Spirit gave them utterance. (5) And there were dwelling at Jerusalem Jews, devout men, out of every nation under heaven. (6) Now when this was noised abroad, the multitude came together, and were confounded, because that every man heard them speak in his own language. (7) And they were all amazed and marvelled, saying one to another, Behold, are not all these which speak Galilaeans? (8) And how hear we every man in our own tongue, wherein we were born?
Notice that everyone heard in their own tongue that was native to them. They did not start babbling a bunch of stuff that no one could understand. When they were filled with the Holy Ghost they started preaching the gospel in other languages, which people that were there could understand. The Bible forbids speaking in a language in church without an interpretter. (1 Corinthians 14:28) Therefore, the whole idea of speaking in some secret language as an evidence of being filled with the Holy Ghost is false and contrary to what is taught in this passage. Then in verse 11 Peter gets up and begins to preach and explain what is happening. Let's pick it up again at verse 34, keeping in mind Acts 2:21 says "whosoever shall call upon the name of the Lord shall be saved".
Acts 2:34-37 For David is not ascended into the heavens: but he saith himself, The LORD said unto my Lord, Sit thou on my right hand, (35) Until I make thy foes thy footstool. (36) Therefore let all the house of Israel know assuredly, that God hath made that same Jesus, whom ye have crucified, both Lord and Christ. (37) Now when they heard this, they were pricked in their heart, and said unto Peter and to the rest of the apostles, Men and brethren, what shall we do?
Acts 2:38-41 Then Peter said unto them, Repent, and be baptized every one of you in the name of Jesus Christ for the remission of sins, and ye shall receive the gift of the Holy Ghost. (39) For the promise is unto you, and to your children, and to all that are afar off, even as many as the Lord our God shall call. (40) And with many other words did he testify and exhort, saying, Save yourselves from this untoward generation. (41) Then they that gladly received his word were baptized: and the same day there were added unto them about three thousand souls.
Peter commands them to repent, meaning change their mind about the Lord Jesus whom they had crucified, and be baptized. The Bible does command us all to be baptized. However, the Bible also commands us to have no fellowship with the unfruitful works of darkness (Eph. 5:11), and to abstain from all appearance of evil (1 Thes. 5:22). There is a difference between a commandment and a condition of salvation. Following the commandments of God is not the condition of salvation, the sole condition of salvation is believing on Jesus.