Question: We utter many statements knowingly or unknowingly, and we do actions, right or wrong. If we have fallen into disbelief (apostasy) unknowingly, what should we do?
Islamic scholars state:
It is indispensable for all Muslims, male or female, to obey the commandments of and to avoid the prohibitions of Allahu taala. If a Muslim does not attach importance to performing acts of worship or avoiding forbidden things, he loses his faith. He who has died in disbelief will be subjected to various kinds of torment eternally in Hell in the world to come. There is no possibility or likelihood for him to be pardoned and go out of Hell.
It is very easy for a Muslim to fall into apostasy. Any word or any deed may cause it. If he, even if he does not know the exact reason that caused him to fall into apostasy, makes repentance and implores Allahu taala by saying the following prayer once every day, O my Lord! If I, knowingly or unknowingly, have uttered a word or done a deed that has caused disbelief, I repent of it. Forgive me, he will certainly be forgiven, thus escaping Hell. In order not to stay in Hell eternally, one has to make repentance every day without fail. There is not a duty of top priority for a Muslim than this repentance.
When making repentance for the sins that involve violations of others rights, one has to restore the usurped rights to the right-holders. As for the repentance for omitted salats, one must strive to make up them. (Endless Bliss)
Question: If a Muslim commits apostasy and then re-embraces Islam, will his previous acts of worship become null and void?
An apostate's rewards of all his previous acts of worship become null and void. If he becomes a Muslim again, he has to renew the pilgrimage (hajj) if he is rich. The possession of all of his property is returned to him. He does not have to reperform his salats, fasts, or zakat. However, he has to make up for those that he missed before his apostasy. A person's apostasy will not absolve him from the sins he committed before apostasy. If the apostate converts to Islam, he does not have to reperform the salats that he missed during his apostasy because disbelievers are not liable for acts of worship. That is, they are required to have faith first. (Hindiyya)
One must learn words and statements that cause apostasy and must be extra careful not to utter them. It is stated in a hadith-i sharif:
(A time will come that a person will lose his faith without even noticing it.) [Daylami]
Protection against apostasy
Question: What should we do to safeguard ourselves against apostasy?
You must, first and foremost, learn words and actions that cause apostasy and abstain from them. A Muslim does not commit an act of apostasy deliberately and does not become a disbeliever intentionally. However, he may do an act of this kind unwittingly. If such a person recites the following prayer with sincerity, he will have faith again:
"Allahumma innee a'oodhu bika min an ushrika bika shai'an wa ana a'lamu wa astaghfiruka li-maa laa a'lamu innaka anta 'allaamul ghuyoob."