Different branches of Islam (Sunni, Shi'a), and different schools within these branches accept different hadith as genuine.
The hadith serves for Muslims as a scripture secondary to the Qur'an, though unlike the Qur'an it is believed to be a work of humans as opposed to a direct revelation from God, and as such it is of lesser important. The hadith essentially is the authoritative exposition of the Qur'an in practice. The laws of the hadith are derived from the acts, statements, opinions, and ways of life of Muhammad. The Hadith is an evolving body of law handed down from the companions (\ahaba) of Muhammad to the present; Muslims believe that the transmission of the Hadith is entirely accurate and without flaw. The Hadith was handed down orally until the mid 700s, at which point collections of Daith were written and later edited. Two different forms of editorial redaction occured:
As the oral law is to Torah in Judaism, the Hadith is to the laws of the Qur'an in Islam. The Hadith is the authoritative interpretation of the Qur'an, even where the current practice is at odds with the plain meaning of the text. Islamic law has some flexibility as some traditions of the Prophet were considered nullified by later sayings of him.
Over time, due to different social, religious and political considerations, many hadith collections developed. A consensus of Islamic clerics weighed various collections, and judged them to be in one of the following categories: "genuine" ('ahih, the best category), "fair" (hasan, the middle category), and "weak" (da'if).
By the ninth century six collections of hadiths were accepted as reliable by Muslims: al-Bukhari (d. 870), Muslim (d. 875), Abu Da'ud (d. 888), al-Tirmidhi (d. 892), al-Nasa'i (d. 915), and Ibn Maja (d. 886). More compilations have developed over time, but these six hold the greatest weight.