There is a "standard" dialect of Arabic that is somewhat artificial, or at least very old-fashioned. It's used for transnational communication and is spoken by newscasters, diplomats, lecturers, advertisers, etc. Most people who have a reasonable level of formal education, or who simply listen to a lot of radio and TV, can understand it even if they might not be able to speak it perfectly.
Arabic more-or-less forms a dialect continuum, in which people in two adjacent regions can understand each other pretty well, perhaps with a little effort, but the people at the ends of the continuum, e.g., Iraq and Morocco, might have a little more trouble. I don't know enough about Arabic to judge for myself, but from what I've heard, it might be something like a conversation between a man from Birmingham, England and one from Birmingham, Alabama--before the Beatles and Monty Python.
Arabic and Farsi/Persian are not related. Arabic belongs to the Semitic branch of the Afro-Asiatic language family; it's closely related to Hebrew and Aramaic, more distantly to Amharic and Berber. Farsi is an Indo-European language, closely related to the Indic languages and a little more distantly to the Balto-Slavic languages. Like all languages in countries that were conquered or colonized by Muslims, it has borrowed a large number of Arabic words. And like many of them, it's written in the Arabic abjad--an alphabet with no vowels since vowels are not phonemic in Afro-Asiatic, although vowels are usually added for use by other languages which need them.
Pashto, one of the two primary languages of Afghanistan, is an Iranic language very closely related to Farsi/Persian. Dari, the other one, is a dialect of Persian.