Dialect is ubiquitous in every language system, and accent is one of the most common difference that people can tell by one’s natural, but sometimes , dialect is way more different with each other from not only accent , but also tone, and idiom, etc.
Dialect in Chinese language system is really complicated, sometimes each dialect seems to be a complete different language, and there are still debates about the category, so I am not here to discuss it in a academical way, only in some general way we have more chance to get connection with.
Mandarin, as a most popular one in the world, is a variety based on the dialect of Beijing area, and had been recognized and promoted by central government since PRC was founded. On the other hand, mandarin promoting is also a part of the Chinese writing system reform, which unified and simplified the writing of the Chinese character compared with the Traditional Chinese used today in Taiwan and HongKong. All of which have a positive influence to minimize the illiterate person among the population.
Another important dialect which is still widely used by local people is Cantonese, the reason why it is still an active language is the culture in southern China area, the culture in southern China, especially in Guangdong, is relatively independent, coupled Hong Kong is an economic and culture center in that area before year 1997. So if you traveled to Guangdong, Hong Kong, you will found most local people speak Cantonese to each other instead of mandarin. My grandma is a Cantonese, but I can not understand a single world if she don’t speak mandarin. As my family lives in northern China for decades, some of my family members can only understand Cantonese, but can not speak it. In fact, cantonese is also very hard for native people to learn.
In northern east area, we call the dialect as northern east mandarin, it can be tell clearly, but fortunately, it is just the accent problem, most people who understand mandarin would have no much difficult to understand southern east mandarin, it is something like Britain English and American English in general.
Although there are thousands other dialects in China, they have less influence compared to cantonese and northern east mandarin, and most of them are difficult to understand, such as in central of China, HuNan,HuBei, AnHui province. southern west dialect is a little easier for mandarin speaker, but still hard.
As mandarin became more and more important in the world, all Chinese children in school will learn mandarin lesson, even in HongKong and Taiwan with Traditional Chinese Writing Character. So nowadays if you are traveling in Guangdong, speaking mandarin to all the young people, they can communicate with you in mandarin without any problem, even some elder one with strong accent mandarin, they can still understand each other.
It is funny that sometimes, Chinese dialect can be a cypher encrypted communication way when you talk to someone on the phone.