Post how you handle it in scifi. I will go first. I looked to reality for inspiration as I did not want to follow the universal translator route. Namely how European explorers learned the language of the north and south american civilizations. Two ways. 1. Send some missionaries in advance for several years. By the time the big ships arrive, chances are somebody the missionary spent time with coukd speak European and translate their language into it as well. Cortes had a native lady named La Mancha or something that did just that. 2. Buy or kidnap some native slaves. They will learn your language sooner or later and translate their own back to you. So either option involves living among people one is unfamiliar with to learn a foreign language. Takes time but effective. If aliens want to learn human languages, one way to do it is to exchange a few aliens to live on Earth for 6 months for a few humans to live with the aliens for 6 months. Guarantee you somebody will learn something in that time. That's all I got. What's yoyr method?
3. Observation of their culture from a safe distance before engaging if they are primitive. Using stealth if they are not primitive. 4. If psychic powers exist, just let a psychic communicate with them. 5. Cosmic web interaction device that can teach ANY language in the universe. 6. Good old fashioned exchange. 7. In my universe the humans have one common main language. Economic and social structures make it very useful to know that language, therefore most people will want to learn it. 8. Translation apparatus either directly implanted or as an external object.
Watch "Arrival" from 2016 for inspiration. A vastly different neurobiology would result in a vastly different perception and dissemination of language. Have you ever considered how weird it is that all humans use weird little symbols to represent something that we can say and its always read linearly (from left-to-right or right-to-left and from up and down or down and up)? It's not a given that an alien race with a vastly different evolutionary pathway would think similarly.
I actually had to do this four separate times in one story. Here's how I handled it: First alien: A member of an alien species was rescued from a doomed ship, without any way to communicate and only one individual. The humans start by figuring out it's basic needs, the humans were lucky that the alien had a basic understanding of science. It had a tablet-like device where it could draw things. When it wanted water, it drew a water molecule: three circles, two with single dots and a central one with eight. The doctor character immediately recognized the molecule which allowed the alien to communicate basic nutritional needs. This allowed the ship's AI to learn how to translate these basics, but they got stuck again until the youngest member of the crew gave the alien a VR set and brought it into his video game. This interaction then allowed the computer to translate much more of the language. The second alien was a robot with a sophisticated AI, this one I handwaved. Because it could think orders of magnitudes faster than us, it just analyzed the technology on board, figured out how to interface with the ship's computer, then get into their data. I figure that if future humans studied our computers, they'd be able to pull some usable data from ancient hard drivers given enough time. The robot's AI was able to do thousands of years worth of human research in seconds, so it took only minutes to become fluent in english. The third culture they observed from orbit, placing bugs in a primitive village and listening and watching the natives interact with each other. With the amount of information coming back from dozens of individuals interacting with each other constantly, the robot and the ship's AI figure out how to translate it in a few days. The last was handwaved entirely. The being was essentially a god and basically did what the robot did on a much larger scale. It looked at the ship, and in microseconds was fluent. I think any type of translation requires a powerful computer and a constant stream of interactions. Without them, it may not be possible to understand. Hell, there are human languages that can not be read even with decades of study. Analysis of the sounds dolphins make indicate that they have a very complex language on par with our own, but we can not translate it.
For the sake of moving the story along, most authors will handwave the problem of learning a new language. On Star Trek, the problem never occurs because every alien species the Federation encounters already knows English and speaks it with an American accent.
Could always hire a translator . . . Also, a droid or computer tablet can translate languages. So can a mysterious book or artifact. Stuff can be magical when you imagine it up too so if it doesn't exist, create it. xD
I'm using telepathy in my book. It opens up enormous possibilities with communicated imagery and feelings.