In The Name of Allaah, The Most Merciful, The Bestower of Mercy
Imaam Ibnul Qayyim (rahimahullaah) said:
The people are four categories in this subject matter [i.e. the obligation of having knowledge of the path of the believers and that of the criminals in detail]
The First Group: They are those who know the path of the believers and that of the criminals in detail, in both knowledge and action. They are the most knowledgeable amongst the creation.
The Second Group: They are those to whom both paths are invisible- those resembling animals. The path of the criminals is conjured for them and they follow it.
The Third Group: It is that one who concerns himself with (seeking) knowledge of the path of the believers and not it’s opposite. He only knows (the path of the criminals) by way of its opposition to the (path of the believers) and in a general way and that all that is in opposition to the path of the believers is falsehood, even though that is not illustrated to him in detail. Rather, when he hears some of that which contradicts the path of the believers, he turns away and does not preoccupy himself in understanding and knowing its falsity. This person is in a state (similar) to one who is safeguarded from following desires, whose heart is neither put at risk nor is he called to (such desires), as opposed to those who are aware of (such desires) and their souls are inclined towards them, but they strive against it for the Sake of Allaah.
A letter was written to Umar Ibnul Khattaab (radiyallaahu-anhu) and he was asked about this affair, as to which of the two men is the best; a man who is not put at risk by way of desires and does not go through its difficulties, or a man who is pushed towards it but abandons it for the Sake of Allaah? Umar (radiyallaahu-anhu) wrote back saying: The one who is desirous of sin but abandons it for the Sake of Allaah is from ‘those whose hearts Allaah has tested for piety. For them there is forgiveness and a great reward.’ [Surah Hujuraat. Ayah: 3]
Allaah (subhaanah) does not test His believing slave with love of desires, disobedience and inclination towards that except that he (i.e. the slave) is urged (by way of that test) towards loving what is greater in excellence and of that which is better, more beneficial and everlasting. And due to his striving to abandon (these desires) for the sake of Allaah, he is made to get closer to the most beloved One (Allaah). This wish, yearning and love (of disobedience) are exchanged with a more everlasting quality whenever his desire, wish and yearning for (disobedience) increases. His quest and eagerness (for obedience) becomes stronger and more perfect, as opposed to the cold soul devoid of that. And even though (the cold soul) may quest for that which is loftiest, however there is a great difference between the two quests (i.e. the quest of the cold soul and that of the one who struggles against his desires in order to obey his Lord)
And have you not seen that the one who goes towards his beloved whilst treading upon embers and prickles is greater than the one who goes towards his beloved whilst riding on large single hump-back camels.
Therefore, the one who gives precedence to his beloved (Allaah) whilst struggling against himself is not like the one who gives precedence to Him but is not in struggle against others. So Allaah (Glorified be He) tests His slave with desires, either as a barrier for him from (those desires) or as a barrier that will (enable) him to obtain the pleasure, closeness and kindness of His Lord.
The Fourth Group: This group knows the path of evil, bidah and kufr in detail and the path of the believers in general. This is the situation of many of those who concern themselves with the beliefs of the previous nations and that of the people of bidah. They are acquainted with (these affairs) in detail, but not with what the Messenger (sallal-laahu-alayhi-wasallam) came with; rather they are acquainted with it in general even though they may know some of it’s affairs in detail. Whoever examines their books will see that.
Likewise, those who know the paths of evil, oppression and corruption in detail and are followers of it; if they repent, abandon these (affairs) and return to the path of the pious believers, then their knowledge of it will only be general. They will not be acquainted with it in that detailed manner known to those who spend their lives (studying) its regulations and ways.
The Objective: Indeed, Allaah (Glorified be He) loves that one should know the path of His enemies in order to avoid and hate it, just as the path of the His awliyaa (close friends) is known and followed.
[Al-Fawaa’d pages 167-180…abridged and slightly paraphrased]