In the Classical world (as might be expected), the circumstances, motivations, and methods of language learning varied considerably. The most famous group of language learners are of course the Roman elite, who were expected for centuries to have at least a reading knowledge of Greek.
On a humbler social level, the tens of thousands of Roman merchants and colonists who settled in the Greek world had to learn enough of the language to go about their daily business. Many of the hundreds of thousands of slaves imported into Italy from the Greek world following the wars of the middle and late Republic, likewise, we’re expected to master at least rudimentary Latin. On a still grander scale, recruits in the Roman army had to absorb enough Latin to follow commands and communicate with their fellow soldiers.
We know most about the Roman elite’s methods of language learning. In his Institutes of Oratory, Quintilian suggests that Roman boys actually start their education with Greek, around the age of seven:
“I prefer that a boy should begin with Greek because Latin, being in general use, will be picked up by him whether we will or no; while the fact that Latin learning is derived from Greek is a further reason for his being first instructed in the latter. I do not however desire that this principle should be so superstitiously observed that he should for long speak and learn only Greek, as is done in the majority of cases. Such a course gives rise to many faults of language and accent; the latter tends to acquire a foreign intonation, while the former through force of habit becomes impregnated with Greek idioms, which persist with extreme obstinacy even when we are speaking another tongue. The study of Latin ought therefore to follow at no great distance and in a short time proceed side by side with Greek. The result will be that, as soon as we begin to give equal attention to both languages, neither will prove a hindrance to the other.” (1.1.12)
Training in Greek began with the alphabet, then proceeded to syllables, words, and finally sentences. More advanced language learning was a matter of rote memorization of literary passages and literal translation. A schoolbook from the fourth century contains parallel Greek and Latin descriptions of scenes from daily life, not unlike something you might see in a modern language textbook: a student gets up, goes to school, eats lunch, etc. The results of such training could be extremely impressive.
A first-century inscription honors Quintus Sulpicius Maximus, a Roman boy already well-known for his poetic skill in Greek by the time he died at age 11. The epitaph is worth quoting:
In memory of Quintus Sulpicius Maximus, the son of Quintus, of the Claudian tribe. His home was in Rome. He lived eleven years, five months, and twelve days. In the third lustrum of the contest [Domitian’s Capitoline Games], entering the competition as one among fifty-two Greek poets, he roused to admiration by his talent the favor he had won by his tender years and came off with distinction. That his parents may not seem to have been unduly influenced by their affection for him, his extemporaneous verses have been inscribed below…..”
Young Greeks seem to have learned Latin by a similar process, copying out lines of Virgil and laboriously proceeding from syllable to sentence. Plutarch comments, briefly and rather cryptically, on how he learned Latin:
“I live in a small city, and I prefer to dwell there that it may not become smaller still; and during the time when I was in Rome and various parts of Italy I had no leisure to practice myself in the Roman language, owing to my public duties and the number of my pupils in philosophy. It was therefore late and when I was well on in years that I began to study Roman literature. And here my experience was an astonishing thing, but true. For it was not so much that by means of words I came to a complete understanding of things, like that from things I somehow had an experience which enabled me to follow the meaning of words.” (Life of Demosthenes 2)
Plutarch’s comment that he proceeded from concepts to words may suggest that mature learners took a more global approach to language learning – but this may be reading too much into a mannered comment.
Proceeding to the second part of your question, about how peoples with no previous contact would communicate – in the classical world, at least, knowledge of Latin or Greek usually preceded conquering armies by centuries. Merchants and mercenaries were often linguistic pioneers, learning at least a smattering of the languages of their trading partners or employers. Sometimes, admittedly, such contact took place without translation. Herodotus reports how a trade might happen without language:
“Another story is told by the Carchedonians. There is a place, they say, where men dwell beyond the Pillars of Heracles; to this, they come and unload their cargo; then having laid it orderly by the waterline they go aboard their ships and light a smoking fire. The people of the country see the smoke, and coming to the sea they lay down gold to pay for the cargo and withdraw away from the wares. Then the Carchedonians disembark and examine the gold; if it seems to them a fair price for their cargo, they take it and go their ways; but if not, they go aboard again and wait, and the people come back and add more gold till the shipmen are satisfied. Herein neither party (it is said) defrauds the other; the Carchedonians do not lay hands on the gold till it matches the value of their cargo, nor do the people touch the cargo till the shipmen have taken the gold.” (4.196)
Typically, however, there were a few interpreters to facilitate trade with even distant countries. Pliny the Elder, for example, mentions how a Roman freedman happened to learn the language of Sri Lanka:
“Annius Plocamus had farmed from the treasury the revenues arising from the Red Sea. A certain freedman of his, while sailing around Arabia, was carried away by a gale from the north beyond the coast of Carmania. In the course of fifteen days he had drifted to Hippuros, a port of Taprobane, where he was most kindly and hospitably received by the king; and having, after a study of six months become well acquainted with the language, was enabled to answer all his inquiries relative to the Romans and their emperor…” (6.84)
The freedman proceeded to facilitate a trade agreement between the king and the Romans.
There was, in short, always contact between far-flung peoples; and where there was the cultural or monetary motivation for communication, a class of interpreters was sure to emerge.