Before I start this article, I want to say that an editor from The Atlantic (who is certainly smarter than me) also wrote an article about the differences between language and dialect. You should check it out.
“Language” and “dialect” are two very different terms, and yet so similar. Here I will not try to give you a clear and documented answer. The differences between the two terms are big or small, depending on who you ask. However, I will try to outline some examples that will better illustrate what these two terms mean.
We can say that a language is basically a collection of dialects. We can also say that a speaker of a certain dialect of a language is able to understand a speaker of another dialect of the same language. But neither of these two statements are 100% true. Indeed, an American can understand very well an Aussie or a New Zealander. A Spaniard who speaks Castilian Spanish may find it quite difficult to understand a Mexican Spanish speaker, but they can still understand each other. But this is not always the case.
Is MSA (Modern Standard Arabic) a language? Hard to say. It is certainly not a dialect. MSA is not spoken as a mother tongue. It is a standard, in all aspects. So, at least in the case of Arabic, the language does not only contain dialects, but the dialects are within the language.
English: I have been to Norway twice.
Bokmål: Jeg har vært to ganger i Norge.
Nynorsk: Eg har vore to gonger i Noreg. (from here)
Most of you probably think that dialects differ only by speech, not writing. Completely false. Above I showed you the difference between the two types of Norwegian, Bokmål and Nynorsk. Are the two dialects? Or are they different languages? It is clear that the two are different both in speech and in writing. Even in the case of Arabic, dialects have different forms of writing. “How are you” is كيفك؟ in Levantine Arabic and in ازيك؟ Egyptian Arabic.
Swedish, Danish and Norwegian (Bokmål) are so similar that they are often mutually intelligible. Are they dialects or languages? They are certainly languages, although they often seem to be dialects.
Certainly the term “language” has a certain socio- and geopolitical character. A country must have its own language, right? By the way, what came first, the language or the country?
China is a huge country with a multitude of dialects. But none has “advanced” to the status of a recognized language. Are Cantonese, Mandarin, languages, dialects, or a group/variety of languages (as Wikipedia says)? Depending on who you ask, the answer you receive will be different. However, the Chinese state will never recognize the “independence” of these languages. The oppressive Chinese state cannot admit that the great Chinese people speak many different languages.
Certainly this article has raised more questions than answers. That was the goal.
I am not a specialist in linguistics, so this article is not a scientific study. The reality is that the terms “language” and “dialect” depend on many factors. And I don’t think anyone can say for sure what the difference is between language and dialect.