There are four shades of meaning
of 'dialect'. To dispose first of the two that are not
used by linguist
1. What a "tribe" speak. As in, "There are eight hundred dialects in New Guinea". A linguist would say there are eight hundred languages. There is some whiff of being not quite fully-equipped that hangs around this sense, as if primitive people have primitive languages. (They don't.)
2. A regional dialect, as in "The poems of Robbie Burns are in dialect". Meaning, not in the standard form of the language. A linguist would include a neutral qualification like 'regional' or 'non-standard' or 'traditional' dialect.
3. In linguistics it is really a relative term: a form of language isn't a dialect per se; rather two forms are dialects of a language if they are mutually intelligible. All forms of a language are some dialect. There is no central standard that is not a dialect.
The situation is analogous to this. Everyone on earth lives in a country, and everyone lives in some province or state of that country. If you live in France, you must also live in some part of France: Normandy, Picardy, Languedoc, etc. And if you speak French, you must also speak some dialect of it: Parisian, Norman, Picard etc.
If you're a native speaker of English, you're a native speaker of one of its dialects, American or southern British or northern British or...
If two forms of speech are so different that their speakers can't understand each other, they're called different languages; if they can understand, they're called different dialects.
The reality is complicated by a few things. Political boundaries make a difference. There is the old saw "a language is a dialect with an army and a navy", originally said by Max Weinrich in Yiddish: A shprakh iz a diyalekt mit an armey un a flot. It can be seen in Europe: Danish and Norwegian are so similar that a linguist would call them dialects of one Scandinavian language. In Yugoslavia there used to be a single language Serbo-Croat, now there are three political countries so they say they each have their own language.
Conversely, the "dialects" of China are in many cases entirely different languages, held together by the fact that the writing system makes them all look the same in writing, because pronunciation isn't exactly indicated.
Another complication is that language boundaries don't follow precise lines. As you travel from Amsterdam to Munich and stop in the villages along the way, gradually the local accent becomes less like Dutch and more like German. You don't get a sharp change at the Dutch/German border, or anywhere else in that area either. Yet the end-points, Amsterdam and Munich, speak quite distinct languages. This gradual change is called a dialect continuum.
And of course you often can't give a clear answer to whether people from two places do or do not understand each other. In the case of English, there is an asymmetrical gradient of comprehension. Almost everyone (all native speakers, I mean) understands American, because of the influence of film and television. But we have more difficulty if we have less exposure to a form. Some British accents -- Glasgow, Newcastle, and Cockney especially -- are virtually incomprehensible to outsiders on first exposure. Britons from other areas usually hear enough to pick up the rhythm, but it can still be very difficult. (This can be controversial, as when subtitles are imposed on a documentary about say Glasgow.)
Another point is that dialect and accent are different. An accent is a way of pronouncing. A dialect difference is also a significant difference in grammar and choice of words. So, although Australian and South African have strikingly different accents from southern England British, the three can be regarded as the same dialect, because the other differences are quite minor. But usage varies somewhat: American linguists make finer distinctions and describe many American 'dialects' that are fairly minor clusters of accent differences with a bit of local vocabulary. Taking this to the limit, theoretical syntacticians sometimes talk about each person's idiolect as their dialect, because the important thing is the 'I-language' in a brain, not the vague and indefinable 'E-language' loosely shared with other speakers.
English-speakers aren't generally aware of dialect continua, because our closest ancestral relative is Frisian, which is definitely not mutually comprehensible. However, English has descendant languages in its creoles. There is in fact a dialect continuum between Jamaican Creole and Jamaican English. (It has given rise to the term decreolization.)
4. The fourth sense of 'dialect' is in the study of Proto-Indo-European and its descendants, where it means a 'branch' of the Indo-European family, such as Germanic, Celtic, or Indo-Iranian, with no particular implication of being at early stages (when they were true dialects) or late stages (after they'd wholly separated). This strikes me as rather an old-fashioned use of the term; however, I have come across it in a modern book.