Once again, totally random.
1) Where conquerors go, they will bring their language with them. Earth's history is full of examples. The Normans invaded English in 1066 speaking French, and the two languages existed side by side. When English did rise to prominence again, it had absorbed an astonishingly large number of French words; about 60% of modern English's vocabulary is descended from Latin in one way or another. The Spanish conquistadores stamped their descendants with their language, rather than taking in the language of the Native American tribes (though there, the sheer number of tribes and languages dying off also had something to do with it). French still lives as a language in Canada, and there are cities in Michigan that bear French names. Hell, in Europe itself the Moorish invasion into Spain introduced a large number of Arabic prefixes and sometimes whole words into Spanish.
And yet, this gets ignored a lot in fantasy, even in fantasy countries that have suffered successive waves of invasion similar to England. The conquerors and the conquered have no problem in understanding each other, no matter how short a time after the conquest it's been or how alien their languages are to each other. That should only happen if the languages are the same in the first place or the conquerors aren't really conquerors at all but are accepted instantly and peacefully into the culture. One language rarely wins the struggle all at once. Battles between individual words can go on for centuries.
If you're writing a detailed history of your fantasy world, make sure you include the linguistic element.
2) It's perfectly possible for different social classes to use different tongues. This happened for several hundred years in England after the French conquered. French was the language of the nobility, the law courts, and the people who liked to consider themselves refined. English was the language of the peasants. That's the reason that several foods like veal have French names; they're the names of the courtly dishes that the nobles were more likely to eat.
If the relations between the conquerors and the conquered are uniformly hostile, it's unlikely in the extreme that they would learn each other's languages just for the sake of learning them. They would know as much as necessary to get by in normal life, no more. And if the higher class tried to stamp out the lower class's language, they're actually more likely to cling to it (see point 6). I always wonder how the prince who's been raised in the palace all his life, away from peasants with a different culture, learned what his parents would almost certainly consider a foreign and 'dirty' tongue. Even if he wanted to learn it as a rebellion against his parents, is it likely that he would find someone to teach him?
3) On the other hand, if relations are friendly, the languages will influence each other. This is another thing that really puzzles me: two cultures live side by side and trade extensively, there are people traveling and intermarrying everywhere, and yet only a few merchants know the neighboring language with any degree of fluency? No. It's nice that the fantasist is trying to portray more than the existence of the execrable 'Common Tongue' crap that's all too common, but people coming into contact so frequently would make something happen. It might be that one language would take charge; it might be that the majority of the population would become bilingual; it might be that a creole of both languages would develop that the citizens of one country only used when in contact with one another. But something would have to happen.
If there is a barrier that prevents one people from learning another's language when they're that close, it had better be something big. Perhaps the other people is completely alien, and while they can make human sounds, the humans can't learn their complicated language because they don't have tails and they don't hear into the supersonic. Or the other people could be open in other matters but fanatically devoted to guarding their language, like Tolkien's Dwarves. Take some thought for it, though. Keeping the languages separate but the peoples mingled just so that you can have people chanting in an Eerie and Cool Fashion at key plot points is silly.
4) Come up with a reasonable way for your character to learn other people's languages. Pray tell me, why does a peasant boy who's never left his farm in his whole life happen to know a language from two kingdoms away?
The answer is, "Because it's convenient for the author." As you can probably tell by now, I don't think that's a proper answer. Some that are:
-The character's family originally came from that kingdom, and he had to learn the language to communicate with his older relatives. (Then you have to answer: Why did they leave their home country?)
-The government is advanced enough to be able to insure education for every student, and decided to include that language in the curriculum. (Why?)
-A substantial minority of the character's society is from that kingdom, including some of his neighbors, and he learned it to speak with friends who came from such families. (Why did they migrate?)
-His family was rich enough to hire a tutor who could teach him in that language. (Why, and why that language, and is this really a peasant family?)
If your character is a noble, you have more options. It could easily be part of court training, so that the character can politely greet ambassadors from other countries in their own tongue (and overhear conversations). Or perhaps the prince will marry a bride from that kingdom, and it's considered a good idea not to just toss the prince and princess at each other and expect them to communicate with gestures.
But the whole thing with peasant boys and girls just happening to learn the language from some ancient wandering mage or something has got to stop.
5) If you're writing a character who originally spoke a different language, don't use Stupid Phrasing. You've probably read at least one book where the author's representing a character with an accent, and uses stammering, or broken sentences, or Yoda-speak, or plain flat-out grammatical errors, to show you that accent.
The main problem with this is that it gets really annoying, really quickly.
If you want to know how to do this right, go read Steven Brust. He manages to convey that his main character's grandfather, Noish-pa, adapted late to Draegaran, the language that most people in the books speak, and he does it without making him incomprehensible or turning him into Yoda. Occasionally he fumbles for a word, or uses an odd plural, such as "elfs." Far more often, he simply speaks carefully, without a whole lot of contractions, and calls his grandson "Vladimir," while most characters in the series call him Vlad. The impression comes across that this is a man who's most comfortable in a different language, but Brust does it subtly, and without a whole lot of stumbling.
You may have to shift to different tricks depending on what style of dialogue you use- one of the reasons that Brust can do this so effectively with Noish-pa is that most of the characters in his books speak in a rather slangy modern style- but it's much better than some of the very stupid ideas that some authors have when trying to represent accents.
6) If you need a basis for a rebellious faction, language works great. This is something that often gets ignored, because the linguistic dimension of fantasy history is usually ignored. But if you're tired of coming up with factions who're upset because of some great injustice long ago, or who are of different races or religions, try this one. Language is a powerful carrier of national identity, and people will hold onto it with incredible ferocity, particularly if a government is trying to stamp it out deliberately. Otherwise, Earth would have had just one language long ago.
Look at the way that Welsh-speakers in the British Isles have fought to bring it back (against old British decrees that children could not, for example, speak or be taught Welsh in the schools). Look at Spain, which suffers terrorist attacks from the Basque-speakers who want to withdraw and become a separate nation. Look at the bitter struggles between English-speakers and French-speakers in Quebec. Language can stubbornly resist sublimation or assimilation for quite a long time, and it can form a reasonable core for a rebellious group to start spinning around, and it can create a bond among people who might not share common living conditions or common goals.
I think it would work a lot better than some of the ideas that fantasy authors use for fomenting rebellions, particularly when the injustices are so old that it's difficult to believe that anyone cares about them anymore.
7) If you have an Ancient Magical Empire that collapsed, it should be followed by linguistic chaos. One word for you: Rome. When it collapsed, the Latin dialects in the different areas Rome had conquered split, becoming the Romance languages that most people know about (Italian, French, Spanish, Portuguese, and Romanian) as well as others that were not as successful (Catalan, Galician, Provencal, and Italian dialects that didn't become the official Italian language). The countries had no contact with each other for long periods of time due to formidable natural barriers and equally formidable distances, and no way to connect back to a capital that would have refreshed their language with constant new injections from the mother tongue. Within a relatively short while, Europe had not new dialects of Latin but new languages, which helped to form the core of their nations.
It drives me batty when I see the descendants of a sprawling, dead Empire still speaking the exact same language despite hundreds of years and hundreds of miles of being apart. (*coughcoughJordancoughcough*). Why haven't the languages split? Again, you're going to have to come up with a convincing reason, and if it's something like magical long-distance communication or magical travel, then there's no way that the "backwater" your hero comes from can be as isolated as you want it to be.
Random, perhaps, but I think language could provide a lot of very fresh plot points...and it gets ignored in favor of those already used instead.