The word Imamah means to lead and an Imam is anything that is followed, whether it is a person and individual or something else, and whether it leads to the right path or the wrong path. But in Islamic terms, it denotes the leading of people by Allah that covers all aspects of human life, even those which are related to the hereafter, and is carried out by a complete person as successor of the prophet.
From Shia theologians’ point of view "Imamah" like "Prophethood" is considered one of the "Osule Din" (Fundamental beliefs of Islam). Shiah scholars also believe that such a position is only granted by Allah to whom he pleases. An Imam has all the responsibilities of a prophet except for prophethood itself.
Being appointed by Allah, Ismah (infallibility) and being the highest are the three requirements of being an Imam. There are several logical reasons as well as a great amount of ahadith that prove the concept of Imamah and prove that all Muslims should obey the Imams.
There are verses in the Quran that can be used as proof for Imamah and the necessity of obeying him. Verse 142 of surah Baqarah, 67 and 55 of surah Al Maedah, which is also known as the verse of Wilayah, etc. are among the verses that are historically linked to Imamah by there "Sha’ne Nozuls" (occasions of revelation/ the historical that entailed the revelation of a verse).
Other than these examples there are verses that directly relate to the Imamah of Imam Ali, like verse 9 of surah Tobah, which is also known as the "Verse of Sadeqin": " یا ایها الذین امنوا اتقوا الله و کونوا مع الصادقین ", or verse 23 of surah Shura, also known as the "Verse of Mawaddah": " قل لا اسئلکم علیه اجراً الا المودة فی القربی ". The ahadith that explain the Sha’ne Nozul of these verses are narrated in both Sunni and Shiah books.
The word Imamah means to lead and an Imam is whatever that is followed, be it a person and individual or something else, and whether it leads to the right path or the wrong path. But in Islamic terms it denotes the leading of people by Allah that covers all aspects of human life, even those which are related to the hereafter, and is carried out by a complete person as successor of the prophet.
From Shia theologians’ point of view "Imamah" like "Prophethood" is considered one of the "Osule Din" (Fundamental beliefs of Islam). Shiah scholars also believe that such a position is only granted by Allah to whom he pleases. An Imam has all the responsibilities of a prophet except for prophethood (and in other words, the receiving of revelation).
Being chosen by Allah, Ismah (infallibility) and being the highest are the three requirements of being an Imam. There are several logical reasons as well as a great amount of ahadith that prove the concept of Imamah and prove that all Muslims should obey the Imams.
Imamah in the Quran:
Several issues fall under this category that we will address separately:
1- The meaning of Imamah in the Quran: The meaning of Imamah is identical to that of Arabic dictionaries, meaning to lead, and consequently an Imam is one who leads and others adhere to him.
2- The verses that relate to Imamah: There are 12 verses in the Quran in which words that relate to Imamah like "Imam" or "A’immah" (plural form of Imam) are used. This word has been used for different instances therein. In eight of these verses the word Imam refers to a human being, in two it refers to a book, in one verse it refers to the "Loh Mahfuz" while in another it refers to the straight path.
Quranic proof that the imam can only be appointed by Allah (swt)
"وَ إِذِ ابْتَلىَ إِبْرَاهِمَ رَبُّهُ بِکلَِمَاتٍ فَأَتَمَّهُنَّ قَالَ إِنىِّ جَاعِلُکَ لِلنَّاسِ إِمَامًا قَالَ وَ مِن ذُرِّیَّتىِ قَالَ لَا یَنَالُ عَهْدِى الظَّالِمِینَ"  And when his Lord tested Abraham with certain words, and he fulfilled them, He said," I am making you the Imam of mankind." Said he," And from among my descendants (will there be any Imams)?" He said," My pledge does not extend to the unjust" (Only those of your offspring that are just and pious will deserve such a rank).
" وَ جَعَلْنَاهُمْ أَئمَّةً یَهْدُونَ بِأَمْرِنَا وَ أَوْحَیْنَا إِلَیْهِمْ فِعْلَ الْخَیرَْاتِ وَ إِقَامَ الصَّلَوةِ وَ إِیتَاءَ الزَّکَوةِ وَ کاَنُواْ لَنَا عَابِدِینَ "  We made them imams, guiding by our command, and we revealed to them the performance of good deeds, the maintenance of prayers, and the giving of zakat, and they used to worship us".
 " وَ جَعَلْنَا مِنهْمْ أَئمَّةً یهَْدُونَ بِأَمْرِنَا لَمَّا صَبرَواْ وَ کَانُواْ بَِایَاتِنَا یُوقِنُونَ"And amongst them we appointed imams to guide [the people] by our command, when they had been patient and had conviction in our signs".
These verses prove that the Imam should be chosen by Allah; because in all of these verses, granting this status has only been attributed to Him, and moreover, the verse of "Ebtela'" (verse 124 of surah Baqarah) has described Imamah as a holy and divine covenant, therefore he will grant it to whom he pleases. These verses also indicate that the Imam should be infallible, and that he should be the highest and most righteous of his people. Clearly no one but Allah can know about the features and virtues all possess and whom possesses more. Therefore the Imam must be chosen by Allah. The philosophy of appointing Imams is to guide and lead people to salvation.
Quranic proof that the people are in need of an Imam
Regarding the necessity of the existence of an Imam in society one must say that the same way prophets are essential for us to reach our perfection, the existence of an Imam is also necessary at all times to continue the mission the prophet has started, and that is to protect religion from potential threats as well as guiding people to the right path.
"انما انت منذر و لکل قوم هاد ” (You are only a warner, and there is a guide for every people), "کونوا مع الصادقین", and the verse of Iblagh are among the verses that indicate the people’s serious need of an Imam. We will point out some of the ahadith and verses that interpret these verses:
1- " انما انت منذر و لکل قوم هاد "  ; You are only a warner, and there is a guide for every people.
2- " اطیعوا الله و اطیعوا الرسول و اولی الامر منکم "  (O you who have faith! Obey Allah and obey the Apostle and those vested with authority among you). All Shia commentators agree that the term " اولی الامر " refers to the Imams.
3- " یا ایها الرسول بلغ ما انزل الیک من ربک... "  (O Apostle! Communicate that which has been sent down to you from your Lord). According to authentic ahadith narrated by Sunni scholars this verse was revealed on the occasion of Qadir Khom and on that very day the prophet, through his appointing Imam Ali (as) as successor, successfully ended his mission. Though the verse is directly related to Imam Ali, but it also indirectly states the necessity of the existence of an Imam at all times.
Verses that prove Imams are chosen only by Allah
There are many Quranic verses that prove the Imamah of Ali and his progeny. However these verses can only be used as proof when backed by the several ahadith narrated from the Prophet which explain the "Sha’n Nozul" of these verses. These ahadith are accepted by both Sunni and Shiah scholars,  here we will mention some of these verses:
1- The verse of Tabliq: "O Apostle! Communicate that which has been sent down to you from your Lord, and if you do not, you will not have communicated His message, and Allah shall protect you from the people. Indeed Allah does not guide the faithless lot." 
Allah strictly commands his prophet to convey his message and according to the ahadith after receiving this revelation the prophet assigned Ali as his successor in a place known as "Ghadir Khom", on that occasion the prophet said: "Whoever I was his mowla, Ali will be his mowla". 
2- The verse of Wilayah: "Your guardian is only Allah, his Apostle, and the faithful who maintain the prayer and give the zakat while performing ruku’." 
A vast majority of Quranic commentators and hadith narrators believe that the verse refers to Ali (as). 
In his book "Al-Durrul Manthur", Suyuti, one of the greatest Sunni scholars, narrates a hadith from Ibn Abbas that "Ali was doing ruku’ in prayer when a needy person approached him. Ali (as) gave him his ring in charity, the prophet asked the poor man: Who gave you this ring? The poor man replied: The man that is bowing down in prayer. (while pointing at Ali )(as)", after this the verse was revealed. 
In this regard Fakhr Razi narrates a hadith from Abdullah Ibn Salam in his commentary on the Quran . Abdollah says that when the verse was revealed to the Prophet of Allah I told the Prophet that I had seen with my own eyes Ali (as) give the poor man his ring and therefore we accept his wilayah! He also narrates a similar hadith from Abuzar that points out the Sha’n Nozul of this verse. 
Tabari, another Sunni scholar, mentions several ahadith about this verse and it's Sha’n Nuzul, and the majority of them state that the verse refers to Ali (as). 
The Great Allamah Amini has mentioned ahadtih from about twenty authentic Sunni books in his valuable book "Al Ghadir" along with their addresses and sources that confirm this verse referring to Imam Ali (as). 
In this verse the Wilayah of Allah, the prophet and Imam Ali are mentioned side by side, indicating that there is no difference between them.
3- The verse of "Ulul Amr": " O you who have faith! Obey Allah and obey the Apostle and those vested with authority among you." 
On one hand, Muslim scholars  believe that this verse refers to Ali (as).
For example, Hakem Hasakani Hanafi Neishaboori, the famous Sunni commentator mentions 5 ahadith when explaining the verse in which the title of "اولی الامر" has been identified with Ali (as). 
Abuhayyan Andolosi mentions different opinions about who the "اولی الامر" are, and mentions that Maqatel, Meymoon and Kalbi (Quranic commentators) believe the verse is referring to the imams from the Prophet's household (as). 
Abu Bakr Ibn Mo'men Shirazy, a Sunni scholar, points out in his treatise of "E'tiqad" that Ibn Abbas stated that the verse referred to Ali (as). 
On the other hand, the verse mentions that Allah (swt), the prophet and the Ulul Amr must be obeyed, all of this with the same wording and without repeating the word “اطیعوا” in the verse, all of which indicate that the imams must infallible as well, or else it wouldn’t be right to order the people to be in total submission and obedience to them the same way that everyone must obey the prophet and Allah (swt) without question, and according to the ahadith, the only ones to be imam are the 12 imams of the Shia.
All of what was mentioned above was only to give a glimpse of the many ahadith narrated by Sunni scholars that prove the Shiah's claim.
There are also many verses that relate to the Imamah of Imam Ali. When searching Sunni books we find significant points pertaining to these verses, for more information you can refer to authentic books on this subject.
Other than these examples there are verses that directly relate to the Imamah of Imam Ali like verse 9 of surah Tobah, which is also known as the "Verse of Sadighin":  " یا ایها الذین امنوا اتقوا الله و کونوا مع الصادقین ", or verse 23 of surah Shora, and is also known as the "Verse of Mawaddah":  " قل لا اسئلکم علیه اجراً الا المودة فی القربی ". The ahadith that explain the Sha’n Nuzul of these verses are narrated in Sunni and Shiah books.
Moreover other verses in the Quran explain the great virtues and features of Ali (as) and how he surpassed all of the prophet’s companions in terms of reaching a higher status in the eyes of Allah. On the other hand common sense says to choose the better person over the one who is simply good, therefore we can conclude that Ali (as) deserved to be accepted as the prophet’s successor more than any one else.
Last but not least is that the status of Imamah is very important in Islam and is considered the last level of one's journey to reach spiritual perfection.
Some times Imamah and prophethood are combined in one person, like in Prophet Abraham or the Prophet of Islam who were both Imams and Prophets of their Ummah, and in other times only one of the two can be found, like the Ahlul-Bayt who were imams.
 For further information, see: Question 997 (website: 1065) Proving Imam Ali's Imamate.
 " یا ایها الرسول بلغ ما انزل الیک من ربک... " Maidah:67, for further information, see: The Sunnis and the verse of Tabligh.
 Makarem Shirazi, Payame Qurani, vol. 9; Emamat dar Quran, pg. 182 and on.
 « انما ولیکم الله و رسوله و الذین امنوا الذین یقیمون الصلاة... » Maidah:55.
 Because according to authentic ahadith the one who gave his ring to the poor man was Ali (as).
 Al-Durrul Manthur, vol. 2, pg. 293.
 Asbabul-Nuzul, pg. 148.
 Tafsir of Fakhr Razi, vol. 12, pg. 26.
 Tafsir of Fakhr Razi, vol. 12, pg. 26.
 Tafsir Tabari, vol. 6, pg. 186.
 Al-Ghadir, vol. 2, pp. 52-53.
 " " یا ایها الذین امنوا اطیعوا الله و اطیعوا الرسول و اولی الامر منکم..
 There are tens of ahadtih mentioned in Tafsir Borhan which have been narrated in Sunni hadith records. These ahadith say that the verse refers to Ali (pb) and the household of the prophet, some ahadith go further and even name each of the twelve Imams as the individuals the verse refers to. Tafsir Borhan, vol. 1, pp. 381-387.
 Shawahidul-Tanzil, vol. 1, pp. 148-151.
 Bahrul-Muhit, vol. 3, pg. 278.
 Ihqaqul-Haqq, vol. 3, pg. 425.
 " یا ایها الذین امنوا اتقوا الله و کونوا مع الصادقین " Tawbah:119. Ahadith tell us that what is meant by the “sadeqin” are Imam Ali (as) and the prophet’s progeny. (Yanabi’ul-Mawaddah, pg.115 and Shawahidul-Tanzil, vol. 1, pg. 262).
 Shura:33. For further information, see: The Ahlul-Bayt and the verse of Mawaddah.
 Adopted from: The Rational Arguments for Imamate, Question 614 (website: 671).