There were obviously traders across nations and ambassadors, so how did these people learn these languages?
Would you clarify the context please. Are you asking about learning a language where there would be someone that can speak both the source and target languages (e.g. a Frenchman learning Russian) or are you asking about the case where the language is entirely new (e.g. Columbus in the Americas)?
u/keyilan talks about the Nogeoldae, a 15th century textbook designed to assist Korean speakers in learning Chinese in this post.