We in Islam have three main sources of legislation:
We believe that the Quran is Allah’s final word to all humanity.
Blessed is He who sent down the Criterion (Quran) upon His Servant that he may be to the worlds a warner –(Holy Quran 25:1)
God sent the Quran to His servant and Prophet Muhammad ﷺ through His angel Gabriel distributed within 23 years. It has been taught to the Prophet’s disciples, where some of them memorized it, others kept on writing it. Then it was collected in one book immediately after the Prophet’s death. And through all ages, there have been many Muslims who memorized the Quran, and those who memorized the Quran had tests to make sure that they thoroughly memorized it. And it has been transmitted through generations that way, simultaneously with writing.
This is a link for a full Quran translation.
2. The Sunna (Hadiths):
The Sunnah is the documentation of the Prophet Muhammad ﷺ’s life, quotes and deeds, what he did, the things he told us to do and not to do, and every Muslim must follow him as God told us in the Quran:
Say, [O Muhammad], “If you should love Allah, then follow me, [so] Allah will love you and forgive your sins. And Allah is Forgiving and Merciful.”(Holy Quran 3:31)
The word “Say” in the above verse is directed to Prophet Muhammad ﷺ. Allah also says in the Quran:
And We revealed to you the message (Sunna) that you may make clear to the people what was sent down to them (Quran) and that they might give thought. (Holy Quran 16:44)
The Hadiths had been transmitted through documenting narrations from the Prophet’s disciples to generations after them, and there were severe conditions for a hadith to be accepted, the documentation began nearly after 100 years from the Prophet ﷺ’s death, but within this time, anyone who tells any hadith must be known within the Islamic society that he is righteous, that he doesn’t lie at all, that he memorizes well and doesn’t forget quickly, and he must say who told him that hadith to know what is his source and examine it and there must be evidence that these two narrators really met each other. There is much documentation about all narrators to examine them and know if they are really accepted or not. The result is that at the end of every hadith, we have a chain of narrators, for that chain to be accepted, it must be continuous (i.e. each narrator saw the one before him and heard from him), and the narrators must have the conditions mentioned before.
The main books of hadith, are Sahih Bukhari, Sahih Muslim which have no false hadith, then there are Al Tirmithee, Ibn Majah, Al Nasa’i, Abu Dawood, Ahmad, Al Bayhaqi, and other books, these books may have weak or false hadith, scientists examine hadiths, and see if it is really right or good or weak or false, actually the science of Hadith is a huge science, and many books have been written about it. Here is a link for translations of main hadith books.
3. Consensus of Muslims:
The consensus here means that all Muslim accepted scholars agreed on something, then we consider it a source of legislation, because Allah said in the Quran:
And whoever opposes the Messenger after guidance has become clear to him and follows other than the way of the believers – We will give him what he has taken and drive him into Hell, and evil it is as a destination.(Holy Quran 4:115)
And Muhammad ﷺ said:
My nation will never agree upon an error
Narrated by al-Tirmidhi, ibn Majah and Abu Dawood.