What do you do if you're confronted with an unfamiliar language, and you have no translator? No language talk-box, no babel fish, whatever your device happens to be.
Well, if you're dealing with seriously different parameters, like underwater communication, or nonhuman speech sounds, you've got a tough task on your hands. Sheila Finch (author of The Guild of Xenolinguists) has argued that it would be next to impossible for us to decipher alien communication in rel life - and I'm inclined to agree on a general level. But let's say we've accepted the science fictional conceit that communication can take place, and should - in that case I think it might be useful to think about what the process of language learning would be like.
There's always the solution of the orphaned alien who speaks his own language yet grows up with humans and learns theirs. That kind of solution is simple, and conveniently hides the yucky details in a place we trust at the same time we don't understand it: the language-learning "black box" of the human (or alien) brain.
But if you've got first exposure, the process is different - and full of opportunities for writers.
Generally a person learning an unknown language will start by trying to associate strings of sounds with their appropriate contexts. The classic example used in a lot of science fictional settings is the one where people point to objects and utter names for them.
Some of you may have seen that Star Trek scene with Counselor Troi where she's talking about the difficulty of determining what an alien says while pointing to a cup of coffee (or something that looks like it). The rough idea, since I don't have the scene itself at my fingertips, is that the word uttered may not be "coffee" or "cup." It might instead be "brown," or "hot," or "enjoy." Or possibly (my ideas) it could be "mine," or "gift for a visitor."
A word, phrase or other utterance comes with a social context, and can never be entirely free of social significance. It can be fun to brainstorm the different kinds of meanings an object might have, since for every possible meaning there's another possibility for misunderstanding. Other posts of mine that relate to this are But what does it mean?(point of view) and Considering the Culture in Objects.
A linguist attempting to parse a new language using technological tools - but not a translator - might begin by making recordings in as many sensory modalities as possible. This would allow them to take time not available to a person who is simply listening. The recordings would allow the linguist to consider observable aspects of the physical situation, and possibly some elements of the social as well (depending on the number of individuals speaking, their dress and behavior, etc.) Breaking speech into words is essentially a process of looking for repeated patterns of sounds and trying to find commonalities across the contexts in which they are used. This goes also for smaller elements of meaning (morphemes).
I thought I'd also add a few notes on language processing.
When we listen to foreign language sounds, the ones that are easiest to capture are the ones at the beginning and end of the utterance.
There is a tendency among many human languages for the subject of the sentence to come first; this isn't always true, but English speakers and speakers of many other languages that follow this pattern will tend to make guesses based on this assumption.
Also, though we don't do it consciously, our brains have an excellent ability to track the frequency of different language items - that is, to say which sounds or words are more common than others.
This barely scratches the surface in terms of the challenges of learning languages the hard way, and the tools people use to deal with them - but I hope you may at least find some interesting ideas here.