Kufr Occurs by Beliefs, Statements and Actions
Imaan an-Nawawi said in “Kitaab ur-Riddah” (The Book of Apostasy), “It is the cutting off of Islaam. This occurs sometimes by a statement which constitutes kufr, and sometimes by an act. And the actions which necessitate kufr (that expel from the religion) are those which are performed deliberately, and mocking the religion is clear [in this regard], such as prostrating to an idol or to the sun, or throwing the Qur-an into filth, and the magic which involves worshipping the sun and other such acts."[1]
Ibn al-Qayyim said, “And likewise, the branches of kufr (amongst them are) those which are statements and those which are actions. And just like a person can fall into disbelief (that expels from the religion) by wilfully saying a word constituting disbelief, and which is a branch of disbelief, then likewise, he can fall into disbelief (that expels from the religion) by doing an act of kufr, from amongst its branches that are actions, such as prostrating to an idol, belittling the mus-haf. So this is a principle"[2]
Shaikh ‘Abdur-Rahman bin Hasan said, “And likewise the Fuqahaa have mentioned concerning the ruling upon the apostate that a person can become a disbeliever by a statement (he utters) or an action he performs, even if he testifies that there is nothing which has the right to be worshipped except Allaah and Muhammad is His Messenger, prays, fasts and gives charity. He becomes an apostate by such statements and actions and whatever he uttered or did nullifies his actions, especially if he dies upon that. In that case the nullification of his actions is a matter of consensus."[3]
[1] Rawdat ut-Taalibeen (7/284-283)
[2] Kitaab us-Salaat (pp.53-54)
[3] Ad-Durar as-Sunniyah (p.214)