A dialect is simply a mutually comprehensible variant of a language. Some claim that the true difference between a language and a dialect is that a language has an army and a dialect does not.
Let me explain. The languages of Swedish, Norwegian and Danish are usually mutually comprehensible to the speakers of all three languages, particularly in the case of spoken Swedish and Norwegian.
For political reasons, though, they are always referred to as languages. Danes tend to have more difficulty understanding Swedish than Norwegian, but if the language is spoken slowly and clearly, they usually understand it very well. In their written forms, Swedish, Danish and Norwegian are all easily understood by the speakers of those particular languages.
Serbian, Bosnian and Croatian are essentially the same language, but for political reasons, they are referred to as separate languages. It is true that they have different writing systems. Serbian is written in Cyrillic and Bosnian and Croatian are written in the Roman alphabet. However, they are all easily understood in their spoken forms.
Hindi and Urdu are also essentially the same language, but for political reasons are considered separate. Hindi is spoken in India and Urdu in Pakistan. Not only are they spoken in different countries but also by members of different religions. Most speakers of Hindi are Hindus and most speakers of Urdu are Muslims.
The Chinese dialects of Mandarin, Cantonese and Hakka share the same writing system but are mutually incomprehensible in their spoken forms. For political reasons, though, they are usually referred to as dialects. Calling them dialects gives the impression that all Chinese speak the same language, but of course this is far from the case. If Mandarin, Cantonese and Hakka had phonetic writing systems, there is no question that they would not be mutually comprehensible in any form. The writing systems make it possible to preserve a sense of unity. The Tibetan language, however, written in a different script, is not comprehensible to speakers of languages such as Mandarin, Cantonese and Hakka in any form. However, it is also banned by the Chinese government at school or work, so many Chinese may not even be aware of its existence.
To be called a dialect, a variety of a language usually has differences in pronunciation, grammar and vocabulary. However, sometimes dialects of a language may be more incomprehensible than two separate languages. For example, speakers of standard Italian may have an easier time understanding French or German than understanding Sicilian. This is particularly true if they have studied those languages and had little or no exposure to Sicilian.
The definition of a dialect can be a tricky one, but generally we regard it as a variant of a particular language such as American English, Australian English, Canadian English and British English. For political reasons, dialects may be referred to as languages or languages as dialects. Some may claim that they do not speak a dialect but the truth is that every speaker has a dialect regardless of how standard it may be.