The Messenger, upon whom be peace, said:
"He who says to his brother 'O disbeliever', then it returns upon one of them."
He also said:
"And he who accuses a believer of kufr (disbelief) then it is like killing him."
Al-Imam An-Nawawi said:
"They differ as regards interpretation of this 'returning', so it is said, 'kufr returns upon him if he is making that lawful', and this is far from the context of the narration, and it is said, 'it is taken to refer to the Khawarij', since they declare believers to be kafirun (disbelievers)."
Al-Imam al-Hafidh Ibn Hajr says:
"And what is correct is that the hadith (narration from the Messenger, peace be upon him, was said as a warning against a Muslim saying that to his brother. It is said, 'What returns upon him is his speaking ill of his brother and the sin of declaring him a kafir (disbeliever)', and this is reasonable. It is also said, 'It is to be feared that this will lead him into kufr', just as it is said, 'sins leads towards kufr'. Thus it is feared that if he continues in that and persists in it then he will have a bad end. I prefer from these sayings that it refers to the one who says it to someone from whom nothing is known except Islam and there is no justification or reason for him to claim that he is a kafir. So in such a case he becomes a kafir himself because of that, and this will be explained. So the meaning of the hadith is that his judgement of takfir (making someone a kafir) returns upon himself, so what is meant is takfir not kufr. So it is as if he passed judgement of kufr upon himself since he passed this judgement on one who is like him (i.e. a Muslim)."
Al-Imam ash-Shawkani said:
"Judging that a Muslim has left Islam and entered into kufr is something that is not fitting for a Muslim who believes in Allah and the Last Day except with a proof (burhan) which is clearer than the daytime sun, since it is established in the authentic hadith reported by a group of Companions that he who says to his brother 'O kafir!' Then it returns back to one of them." In another wording, 'Whoever addresses a man with kufr, or says 'Enemy of Allah' and he is not that, then it returns back upon him.' "
So in these ahadith (plural of hadith) and others similar to them, there is the severest reprimand and the greatest warning against hurrying to perform takfir. Allah, the Mighty and Majestic, says:
" ... and such as open their breasts to disbelief ... "
So what has to be the case is that the heart embraces kufr and is at peace with it, and the soul is satisfied with it. So the appearance of wicked beliefs only is not to be taken into account here, especially if one is ignorant of the fact that they are contrary to Islam. Likewise account will not be taken of the appearance of an action of kufr for the one who did not intend to leave Islam by it and enter into kufr, and likewise account will not be taken of a word spoken by a Muslim which is a saying of kufr, when he does not believe what it means. [Taken from As-Sayl ul-Jarrar (4/578) and adapted]
So where do they stand those who hasten to perform takfir of the Muslims in relation to the saying of the Messenger, peace be upon him, "Abusing a Muslim is open sin and killing him is kufr." [Agreed upon] And in relation to his saying, "The Muslim is the Brother of a Muslim, he does not oppress or forsake him." [Reported by Muslim] Also in relation to his saying, "All of the Muslim to the Muslim is inviolable; his blood, his wealth and his honour." [Reported by Muslim, Abu Dawud and At-Tirmidhi]
Al-Imam Al-Qurtubi says in his tafsir (exegesis / explanation) of Surah Al-Hujurat:
" ' ... and His (Allah) saying: 'lest your deeds be rendered fruitless while you perceive it not' [Al-Quran 49:2] does not mean that a person becomes a kafir without knowing since just as a person does not become a believer except through choosing iman (faith) over kufr, then likewise a believer does not become a kafir without intending kufr and choosing it, and there is consensus (ijma') regarding this."
From Al-'Udhr bi'l-Jahl (The Excuse of Ignorance). Translated by Abu Talha Dawud ibn Ronald Burbank and adapted by Abu Muntasir ibn Mohar 'Ali