We learn that this miracle of tongues-speaking was predicted by the prophet Joel, in the second chapter of his book. Joel used the word "prophesy", but Peter applies it to the tongues miracle (Acts 2:14-17). This lets us know that these tongues were a direct product of God's prophetic power. These tongues did not originate from inside the speakers, just as the Old Testament prophets' predictions of the future did not originate from them. The Spirit was speaking through them.
We also learn that tongues-speaking was the miraculous, Spirit-inspired ability to pray or sing in a real language foreign to the speaker. Luke says that the 120 prayed and spoke in "languages" (Acts 2:4), which is the meaning of the Greek word glossa. The 120 spoke actual languages, which the crowd understood (Acts 2:7-11). In this instance, no spiritual gift of interpretation was needed. The various members of the crowd simply understood whatever language or dialect was being uttered.
Peter said this miracle was a sign of Christ's ascension (Acts 2:33). Christ on His throne intended to reach out to all language-groups of the world, using all their languages. There is no one language by which every Bible must be translated, or in which the Gospel must be preached. So, Peter tied the miracle as a sign one part of Christ's redeeming work.
It is important to notice that Peter does not promise the crowd the ability to pray in tongues. If they receive Jesus as Savior, God will give them all the Holy Spirit (Acts 2:38). But the Giver isn't the same thing as His gifts. If any in that crowd of 3,000 who believed ever did pray in tongues, we have no record of it. (In the same way, there is no record of the Samaritan Christians from Acts 8 praying in tongues). Maybe they did, but we don't know because Luke is silent about it.
God gives tongues as a sign a second time, to show the apostles that God accepted Gentiles through Christ. This was how Peter interpreted the miracle God gave Cornelius and his family (Acts 10:44-46, 11:15-18). This was an important sign, to break down the hesitancy Jewish believers in Jesus felt toward Gentile converts.
The third and last case of tongues as a sign happens in Acts 19. Paul meets twelve former followers of John the Baptist. We don't know where they had been all those years, but they were uninformed about Christ. Paul brought them up to date on the person and work of Christ Jesus. He asked them if they had received the Holy Spirit, but they were unfamiliar with this idea. After baptizing them in Christ's name, Paul laid his hands on them and they were filled with the Spirit and spoke in tongues (19:5-6).
This was a sign of Paul's true apostleship. Years before, a Samaritan named Simon noticed that apostles had the authority to confer the Holy Spirit (Acts 8:18), and tried to buy it. Peter rebuked him sharply. This was not something that just anyone could do, let alone buy! Paul's ability to do this was another proof that he was a true apostle of Christ. Paul's apostleship was often attacked, but this incident supported his God-given authority.
So: the three recorded instances of tongues-speaking in Acts were three signs. The first, a sign of Christ's ascension. The second, a sign of Gentile acceptability to God. The third, a sign of special apostolic authority.
Each of these signs were tied to three specific, unchanging historical facts in God's plan of redemption. For this reason, we should not teach these Acts incidents as timeless, universal examples. These are not examples of what all Christians everywhere should experience. That would be a misunderstanding of the miracles' purposes.
These were the signs of tongues. There is more to be learned about the spiritual gift of tongues (which, based on details of the chapter, might be a different phenomenon) from 1st Corinthians 14. Those principles would be more directly applicable to all Christians.