The ability to speak in an unknown tongue was one of the gifts of the Holy Spirit given to the apostles at Pentecost.
Acts 2:1-6 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.
To speak in tongues is to speak in a foreign language, so that people whose native language it is can understand.
After Pentecost it becomes clear that the apostles could bestow Holy Spirit gifts upon others by prayer and the laying on of their hands.
How it worked is illustrated in Acts 8
Acts 8:12-19 …when they believed Philip preaching the things concerning the kingdom of God, and the name of Jesus Christ, they were baptized, both men and women. 13 Then Simon himself believed also: and when he was baptized, he continued with Philip, and wondered, beholding the miracles and signs which were done. 14 Now when the apostles which were at Jerusalem heard that Samaria had received the word of God, they sent unto them Peter and John: 15 Who, when they were come down, prayed for them, that they might receive the Holy Spirit: 16 (For as yet he was fallen upon none of them: only they were baptized in the name of the Lord Jesus.) 17 Then laid they their hands on them, and they received the Holy Spirit. 18 And when Simon saw that through laying on of the apostles’ hands the Holy Ghost was given, he offered them money, 19 Saying, Give me also this power, that on whomsoever I lay hands, he may receive the Holy Spirit.
From this we understand the following:
1. The Holy Spirit was not automatically given to the converts when they first believed or when they were baptised.
2. Philip, although full of the Holy Spirit and abler to work miracles could not bestow the Holy Spirit on his converts.
3. It was by the prayer of the apostles and the laying on of their hands that the Holy Spirit was given.
From Paul we understand that of those who had Holy Spirit gifts, not all could speak in tongues.
1 Corinthians 12:30 Have all the gifts of healing? do all speak with tongues? do all interpret?
The implied answer is NO.
Speaking in a foreign language was a sign to unbelievers because they would hear the gospel in their own language.
1 Corinthians 14:21-22 In the law it is written, With men of other tongues and other lips will I speak unto this people; and yet for all that will they not hear me, saith the Lord. 22 Wherefore tongues are for a sign, not to them that believe, but to them that believe not…
Speaking in a foreign language was not permitted in the church unless an interpreter was present
1 Corinthians 14:27-28 If any man speak in an unknown tongue, let it be by two, or at the most by three, and that by course; and let one interpret. 28 But if there be no interpreter, let him keep silence in the church…
From the scriptures we draw the following conclusions:
1. The Apostles received the Holy Spirit at Pentecost.
2. The apostles could bestow Holy Spirit gifts upon others by prayer and the laying on of their hands.
3. Not everyone who had Holy Spirit gifts could speak in tongues.
4. Those upon whom the apostles bestowed Holy Spirit gifts (for example Philip) could not pass them on to others.
5. When the Apostles died Holy Spirit gifts were no longer available
6. Holy Spirit gifts in the form of supernatural powers are not available today.
7. Incomprehensible gabbling is not a sign that one possesses the Holy Spirit.
8. Holy Spirit gifts are not essential for salvation.
May I suggest that you read ‘Christianity and the gift of Tongues’ here:
https://www.thisisyourbible.com/library/show/616
I hope you find this helpful.
God bless,
Glenn