A lot of the story ideas I've cooked have involved people from very different cultures meeting each other, but what has always stumped me is the part where these people have to learn each other's language. The major problem is that these ideas invariably take place in settings where simple language classes don't exist. How exactly did people learn new languages before the invention of language classes in school? Is it even possible to learn a new language if you've never encountered its associated culture before?
Languages are most often learned (outside of formal classes) by immersion in the culture. You pick up the essential words and phrases first, and gradually pick up more by listening to and interacting with native speakers.
Words are symbols; their meaning agreed upon and mutually understood by those who share them. I can point to an apple and say, "Apple." The other person, knowing what I am referring to, can point to the same object and say, "Manzana." Which I then know is the word for that object, in their language. A simplistic example, but that's often how it starts in informal exchanges of words/language - with objects. At least in my personal experience. Much of history is filled with peoples coming into contact with people of other languages, and sharing/assimilating languages. Vernacular, for instance? Formal classes are a relatively recent/novel accomodation.
I agree with Cogito. Immersion is the most effective way to learn a language. It is how you learned to speak as a child. At that point in life, you never encountered a culture before. How do you think people a thousand years ago learned the languages of a foreign countries? It was along the same principle.
Following on from Anonym's response, what would usually be first established is a simple trade pidgeon language where essential terms are learnt in the point and repeat manner described. In this pidgeon it is likely the dominant language would account for most of the terms, and that inflection and derivations would go out the window. With longer exposure the gaps would be filled in, and with total immersion (and providing the learner is physically capable of making the required sounds) fluency would follow in all but the very stubborn and/or language-deficient.
I'd also add that, as a writer, you probably don't need to go into much detail about how your characters learn other languages, unless the learning process itself is part of the story. It's very common for people to speak more than one language. Your readers probably don't care how they learned them and don't need to be told.
Mostly, they didn't. 2000 years ago, you could find many Romans who spoke Greek (learnt it as school) but hardly a Roman who could speak Proto-Germanic. No classes available, sorry. I consider myself personally to be reasonably talented concerning languages. I learnt two in the immersion environment described (but had classes in them as well, of course), and four others in classes with some immersion added to varying degrees. I find learning a language outside of a language class, before my language proficiency level is high enough to be self-sustaining, incredibly hard. That is, using CDs, textbooks, tapes, what have you, only, instead of a capable teacher and a set curriculum. However, some people can learn languages in this way.
Michael Crichton faced that situation in "Eaters of the Death" (made into the movie titled, "The Thirteenth Warrior"). A tenth century Arab traveled with a group of Vikings. As I recall one of the Vikings had a little knowledge of Latin which facilitated communications.