It's a political distinction, and linguists generally try not to make that distinction, using words like "tongue" (for the language/dialect) or "speech community" (for the people who speak it). cf. the way that Serbian/Croatian, or Danish/Swedish, are considered different languages, while the much more distinct Arabic and Chinese spoken tongues are considered dialects. (Note - Tunisian is considered a separate "language" in Tunisia, purely because of the way Tunisians view it. It's not actually any more distinct from other Arabics than, say, Iraqi or Moroccan.)
Or the way that Dutch is considered a separate language, while the very similar tongues that exist in Germany on a continuum between Standard German and Dutch are considered German (or Frisian, or Dutch) dialects.
It's a political distinction, and linguists generally try not to make that distinction, using words like "tongue" (for the language/dialect) or "speech community" (for the people who speak it). cf. the way that Serbian/Croatian, or Danish/Swedish, are considered different languages, while the much more distinct Arabic and Chinese spoken tongues are considered dialects. (Note - Tunisian is considered a separate "language" in Tunisia, purely because of the way Tunisians view it. It's not actually any more distinct from other Arabics than, say, Iraqi or Moroccan.)
Or the way that Dutch is considered a separate language, while the very similar tongues that exist in Germany on a continuum between Standard German and Dutch are considered German (or Frisian, or Dutch) dialects.