It is important to not be confused between what a thought is and what a belief is. Sometimes the Shaytan (the Devil) brings thoughts to our mind which are kufr. In this case, we need to reject the thought in our heart and fight to get rid of it. As long as we fight it and do not believe it, we are Muslims. However, if someone believes the kufr he left Islam. The Shaytan tries often to bring such thoughts to Muslims that is why it is important to know the difference between a thought and a belief.
More examples of kufr
If someone asks you how to become Muslim, telling him to wait even for a moment, it is kufr. You tell him or her to say, “I firmly believe that no one and nothing deserves to be worshipped except Allah, and Muhammad is His Prophet and Messenger,” with intent to become Muslim...