How Was the Adhan Prescribed in Islam?
Question

Why can we hear the Adhan in the mosque?
Praise be to Allah.The Meaning of Adhan in Islam
The word Adhan in Arabic means announcing or proclaiming. In Shari`ah terminology, Adhan means announcing the time of prayer. (End quote from Majmu` Al-Fatawa, 22/72)
The Dream Due to Which the Adhan was Prescription
The Adhan was prescribed at the time of the Messenger of Allah (peace and blessings of Allah be upon him) in Madinah, after a dream seen by one of the Companions.
It was narrated that `Abdullah ibn Zayd ibn `Abd Rabbihi (may Allah be pleased with him) said: “When the Messenger of Allah (peace and blessings of Allah be upon him) decided to use a bell, he did so reluctantly because that was like what the Christians did.
Then at night whilst I was sleeping, a man walked around me [in my dream], wearing two green garments and carrying a bell in his hand. I said to him, ‘O slave of Allah, will you sell the bell?’ He said, ‘What will you do with it?’ I said, ‘I will call (the people) to prayer.’ He said, ‘Shall I not tell you of something better than that?’ I said, ‘What is it?’ He said, ‘Say: ‘Allahu akbar…’ (to the end of the Adhan).
The following morning I came to the Messenger of Allah (peace and blessings of Allah be upon him), and told him what I had seen. He said, ‘It is a true dream, in sha Allah. Go out with Bilal to the mosque and teach it to him, for he has a more melodious voice than you.’
I went out with Bilal to the mosque, and I started teaching him the words and he was calling them out. `Umar ibn Al-Khattab heard the voice from his house and came out dragging his lower garment and saying, ‘O Messenger of Allah! By Allah, I saw the same (dream) as him.’ The Messenger of Allah (peace and blessings of Allah be upon him) said, ‘To Allah be praise.’” (Narrated by At-Tirmidhi, 189; Abu Dawud, 499a and Ibn Majah, 706; it was classed as authentic by Ibn Khuzaymah, 1/189; Ibn Hibban, 4/572 and Al-Albani in Tamam Al-Minnah, p. 145)
The Communal Obligation of the Adhan
The Adhan is a communal obligation. The people of every town must have someone among them who can give the call to prayer so that the people may be informed that the time for prayer has come.
The scholars of the Standing Committee said:
The Adhan is a communal obligation in a town, and the same applies to the Iqamah. If a person starts to pray without the Adhan or Iqamah, whether out of forgetfulness or ignorance, or for some other reason, the prayer is still valid. The same applies if the muezzin forgets the phrase As-Salatu khayrun min An-Nawm (prayer is better than sleep) in the Adhan for Fajr prayer; the prayer is still valid even if there is still time left after he has finished his prayer (i.e., he does not have to repeat it). And Allah is the Source of strength; may Allah send blessings and peace upon our Prophet Muhammad and his family and companions. (End quote from Fatawa Al-Lajnah Ad-Da’imah, 6/54)
The Virtues of the Adhan
There are many Hadiths which speak of the virtues of the Adhan, such as that narrated by Al-Bukhari (609), from Abu Sa`id Al-Khudri (may Allah be pleased with him), which says that the Prophet (peace and blessings of Allah be upon him) said: “No jinn or human hears the voice of the muezzin for as far as it carries, but he will bear witness for him on the Day of Resurrection.”
And Allah knows best.