Strictly speaking, the official spoken language in Chinese mainland is known as "Putonghua" (普通话) or "Modern Standard Chinese" (MSM, 现代标准汉语), while the official spoken language in Taiwan is called "Mandarin" (國語).
Both Putonghua and Taiwanese Mandarin are dialects of Pekingese (北京話). While there are differences among them, people who speak these three dialects can practically understand each other without difficulties. When no distinction is needed, English speakers often simply refer to all these three dialects as "Mandarin".
As you have pointed out, there are many other Sinitic languages apart from Mandarin. In practice, many of these languages are mutually unintelligible. So, yes, similar to your example of French vs Italian, Mandarin, Min, Hakka, Cantonese etc. are different spoken languages.
That said, since Putonghua is the official language in Chinese mainland and it is the teaching medium in schools, most Han Chinese people in Chinese mainland now speak Putonghua.
Ethnic minorities are also forced to learn Putonghua in schools. This policy has created some very serious tension between some ethnic minority groups and the Chinese government. But politics aside, many non-Han "Chinese" people do speak Mandarin nowadays as their first or second languages.
Foreigners tend to think that almost all people in China speak Mandarin, but in reality this is far from being true. If I remember correctly, according to official figures from the Chinese Ministry of Education, about ten to twenty years ago, only 58% of all "Chinese" people spoke Mandarin. The figure I read a few years ago was slightly lower than 70%, but I don't remember the precise number.
In Macau and Hong Kong, the majority populations are Cantonese speakers. Owing to close economic/cultural ties between these two cities and the Chinese mainland (and also Taiwan), many people in these two cities do understand Mandarin to various degrees. But there are also people who don't speak or comprehend Mandarin at all.
So, to answer your question, if a foreign learner of Mandarin goes to Shanghai and Taiwan, the chance that he can understand and speak with the locals is close to 100% (assuming that he speaks Mandarin well). But if he goes to Hong Kong, the chance that he can communicate well in Mandarin with the locals is significantly lower (I would say 50-50). Since the de facto official languages in Hong Kong are English and Cantonese, I would suggest him to speak English instead.
As for written languages, practically what Han Chinese people write are all dialects of each other, and is (IMHO) more appropriately called "官話" (also called "Mandarin" in English; now you see that there are many loaded meanings for the word "Mandarin"). While there are recognisable regional differences between the styles, vocabularies and grammars of these written dialects, such differences are not large enough to justify calling those dialects different "languages". Nevertheless, as in the case of English accents, the differences between dialects of written "Mandarin" are often large enough to alienate these dialects among themselves. For instance, suppose you ask an average Cantonese speaker in Hong Kong how he would classify his written language, and three choices are given: (a) 官話, (b) 國語 or (c) 普通話 (all these three terms can be called "Mandarin" in English). It is very unlikely that one would pick (c).