The difference between "dialect" and "language" is loaded with all sorts of political and social implications, which is why you'll find cases where what are considered different "languages" have only minor variations in grammar, pronunciation, and spelling, while in other cases you'll have very different "dialects" which are not mutually comprehensible at all, but considered the same "language". Chinese and Arabic are examples which effectively aren't one specific language, but a language family: groups of languages descended from the same original classical language and considered "dialects", but in practice are very different from each other. To give it a European context: Portuguese and Romanian both originated from Latin, but we wouldn't think of them as dialects of the same language. But you will find differences as great as between those two languages or more in the various Chinese "dialects".
One thing which helps Chinese stay a bit more unified is the written language, but even then, there are differences between dialects, plus the fact that some regions (Taiwan and Hong Kong, for example) still use "traditional" characters, while the mainland and Singapore switched to a "simplified" system developed in the 20th century.