Hebrew, Aramaic and Arabic-- all go back to one ancient "root" language we might call "Common Semitic". This is the starting place for understanding why a speaker of one language may understand, or at least easily learn, another of the languages. It's a bit like French, Italian and Spanish speakers whose languages all go back to Latin.
Now much of the ancient historical relationship amongst the different Semitic languages is obscure, and some of it is highly debated, since that 'language history' has to be reconstructed based on clues left in the languages (or in written records of earlier forms of the languages). The "family tree" model also has some significant weaknesses (see below), but is still useful for drawing a rough picture.
Here's a sketch:
1) HEBREW and Aramaic are fairly closely related, coming from two 'subbranches' of part of the large tree of Semitic. "Aramaic" actually covers a diversity of dialects. Hebrew is a "Canaanite" language (the last remaining), and was spoken by the 'people of Israel' up to the time of the Babylonian Captivity in the 6th century B.C.. (The precise beginnings of Hebrew are murky.)
These two subbranches are the main representatives of what are usually called the "Northwest Semitic languages", though in more recent systems they may also be called "North Central Semitic" languages.
2) ARAMAIC - Historically we know that various types of Aramaic were spoken in Syria (a region called "Aram" in the first millennium)-- in the lands between the Mediterranean coast and Mesopotamia. These lands and peoples came under the control of the Assyrians ("Neo-Assyrian Empire"), then the Babylonians ("Neo-Babylonian Empre" of Nebuchadnezzar, etc), and later the (non-Semitic) Persians. But rather than these peoples adopting the language of their Mesopotamian conquerors (esp. the "Neo-Assyrian" and "Neo-Babylonian" dialects of the Eastern Semitic language scholars call "Akkadian"), Aramaic itself became the lingua franca of these empires, and eventually many of the legal documents were written in Aramaic. (Persia continued this practice.) [Note that "Neo-Babylonian" is NOT Aramaic, but the dialect of Akkadian.]
Leading members of the Hebrew-speaking peoples of the Kingdoms of Israel and Judah were carried into exile by the Assyrians & Babylonians. When their descendants returned they brought the Aramaic language back with them, though they continued to use Hebrew for religious purposes. (Because these returnees were chiefly from the former Kingdom of Judah, they were called "Judahites", from which we get the word "Jews" ["Juedisch" /"Yiddish" in German]. )
Aramaic dialects of various sorts continued to dominate the region for many centuries (though Greek was also used for various purposes after the rise of the Greek Empire and esp its Mesopotamain offshoot, the Seleucids). In the early centuries of the church the later Aramaic dialect/language known as Syriac was dominant (hence one of the earliest translations of the New Testament is the Syriac).
3) Another Semitic language, ARABIC, swept across the region and displaced most of the Aramaic dialects with the rise of Islam and Arab conquest (though a few small pockets preserved Aramaic, and a handful of "Neo-Aramaic" dialects survive to this day). But what exactly is the relationship of this Semitic language, esp. to Aramaic?
The "family tree" explanation has shifted a bit over the years. Arabic used to be classified with "Southern Semitic" languages (including Southern Arabian and, more distantly, the Ethiopic Semitic languages). In the past generation a new scheme has been widely accepted which suggest a closer ORIGINAL relationship of Arabic to those "Northwest Semitic" languages (including Aramaic) -- and groups them together as "Central Semitic" languages.