There are diverse purposes for the gift of speaking with tongues.
If it is a language unknown to the speaker but known to an unbeliever, then it serves as a sign to the unbelievers. (1 Cor 14:22; Acts 2:11; Acts 10:46)
If it is a language unknown to the speaker and interpretation is given among a group of believers then it serves as prophecy and edifies the church. (1 Cor 12:10; 1 Cor 14:2, 5; Acts 10:44-46)
If it is a language unknown to the speaker and there be no interpreter then the speaker should speak quietly/privately to himself and to God and serves to edify the speaker. (1 Cor 14:2; 1 Cor 14:14-15; Rom 8:23,26; Eph 6:18; Jude 1:20) This is also known as praying with the spirit (1 Cor 14:15; Eph 6:18; Jude 1:20) and can pray for the interpretation (1 Cor 14:13)
forbid not to speak in tongues (1 Cor 14:39)