Arabic is in the Semitic language group. Semitic languages seems to have gotten started before the beginning of writing, somewhere near modern Syria. They spread from there through Lebanon, Israel, and Jordan down to the Arabian peninsula. Because the Arabian peninsula was more isolated, people there kept speaking an older version of the language. But in Israel and Syria, Semitic languages mixed more with Indo-European and other language groups and changed into Hebrew and Aramaic.
Until the time of Mohammed, in the 600s AD, people mostly spoke Arabic and didn’t write it. Still, there are some written records from the Arabian peninsula from before the 600s AD. We call these Sabataean. But they are only short inscriptions in stone, not literature.
The alphabet first came to the Arabian peninsula not too much before 400 AD, and people soon used it to write Arabic. So the Arabic alphabet, like all the other alphabets, comes from the first alphabet invented in the Levant (in the Sinai).
But Arabic had a bigger future ahead of it. After the Islamic conquests of the late 600s AD, people started to speak Arabic all over the Islamic Empire, from Afghanistan to Spain. By 1000 AD, some people knew Arabic even in India and East Africa.
Many people began to write in Arabic. Among the first things they wrote was the Quran, but soon they wrote many Arabic scientific texts and medical books and math books. They also wrote Arabic stories like the Arabian Nights or the Shahnameh. Arabic writers retold older stories from other places. The Greek story of Odysseus and the Cyclops finds its way into the story of Sinbad the Sailor, and they retold the Indian Jataka Tales as Nasruddin stories. (You can compare stories about the trickster Nasruddin to African Anansi stories, too) There were many Arab historians, geographers, philosophers, and poets. But in the eastern part of the Islamic Empire, many people still spoke and wrote in Persian (an Indo-European language). One famous Persian story, written about 1000 AD, is the story of Sohrab and Rustem.
Here’s a song by Yusuf Islam (who used to be Cat Stevens) to teach the Arabic alphabet:
As Turkic and Altaic people from Central Asia moved into West Asia, beginning in the later medieval period, many people also told or wrote stories in Turkish.