Here is a response I gave to someone else on the issue. It helped him to have a better understanding and he's speaking in tongues now on a regular basis and seeing quite a few changes in his walk with God as a result.
Please feel free to ask as many questions as you want. I don't necessarily know everything, but I know a lot.
It is my understanding that there are 2 types of tongues. Which means, that the Holy Spirit, using your tongue, speaks in a language you don't know and have never studied.
1. A language that someone, somewhere on earth would understand in the natural. We see this in Acts 2:4 where the disciples along with several others are filled with the Holy Spirit. As part of this infilling they began to speak in different and foreign languages they had never studied. As a result, in every dialect within the city that day, was heard the glories of God.
2.A language of Angels. I believe this one can be split in to 2 parts.
A. Prayer between you and God only. This is for your edification. For you to be made stronger.Paul refers to this in 1 Cor 14:2, 4
B. A message for the body that needs someone with the gift of interpretation to interpret. Paul refers to this one in 1 Cor 14:1, 3, 5-13. Reading the whole chapter is a good idea.
WHAT'S THE POINT?
The point of tongues as described in #1 is, I believe to be mostly a witnessing tool to someone of another language who needs to know Jesus. That is basically what is seen in Acts 2 . There were about 3000 souls added to the church that day (v41)
I had a friend, who when waking up from surgery was approached by the nurse and asked how long he had spoken Hebrew. He told her he did not speak Hebrew. She then told him that while under anesthetic, he spoke fluent Hebrew, and the surgeon, who was Jewish, understood every word. While being operated on my friend witnessed to his doctor.
I've also heard of other situations where missionarys spoke in languages they had never studied and people were saved because it was in their language.
The point of tongues as described in #2A, is to build you up spiritually, which may also manifest physically. Such as your feeling depressed, you allow the Holy Spirit to pray through you in your heavenly language, He requests what is needed, you are strengthened, and you feel uplifted spiritually and physically.
We can see this in Romans 8:26-28 (Amplified) "the Holy Spirit comes to our aid and bears us up in our weakness; for we do not know what prayer to offer nor how to offer it worthily as we ought, but the Spirit Himself goes to meet our supplication and pleads in our behalf with unspeakable yearnings and groanings too deep for utterance.
And He Who searches the hearts of men knows what is in the mind of the Holy Spirit, what His intent is, because the Spirit intercedes and pleads before God in behalf of the saints according to and in harmony with God's will.
We are assured and know that God being a partner in their labor , all things work together and are fitting into a plan for good to and for those who love God and are called according to His design and purpose".
The trinity, working together for your benefit is in full view in these 3 verses. When we don't know how to pray, the Holy Spirit, praying through us, intercedes for us. The one who searches the hearts of men (Jesus), understands what the Spirit is requesting through you. And then God, who is in partnership with them (Holy Spirit and Jesus) works everything together for good to those who love Him, and fits it into His design and purpose.
This form of tongues can and should be used at any time. You can pray out loud or you can pray silently. When witnessing to a Muslim once I prayed silently in tongues the whole time. And each step of the way the Holy Spirit directed.
You can pray in tongues when you are in need physically, spiritually, or mentally. When your feeling weak and see the possibilities of walking into sin, pray in tongues, you will get the strength you need to overcome
When being like Christ seems too tough and you feel like giving up, pray in your heavenly language and you wll get the strength to persevere.
Pray in your heavenly language when you see you need more love, peace, joy, longsuffering, gentleness, etc. You may not know what to say but the Spirit is never at a loss for words.
Pray in tongues when your overwhelmed by God's love for you. I sing to Him in tongues all the time.