Imaam Ibnul Qayyim [rahimahullaah] said:
A slave is not afflicted with a punishment greater than the hardness of the heart and being distanced from Allaah. The fire of (hell) was created to soften the hardened hearts. The farthest hearts from Allaah are the hardened hearts. When the heart is hardened, the eyes become lacking in (discernment, perception, crying out of fear of Allaah etc). The hardness of the heart occurs due to four [affairs] when their limit is exceeded: Food, sleep, speech and mixing [with the people]. And just as the diseased body is not benefited by food and drink, likewise the heart is not benefited by admonitions when it is afflicted with [evil] desires. Whoever desires purification of his heart then let him give precedence to Allaah over his desires. The heart that is attached to desires is veiled from Allaah depending on the strength of its attachment to [such desires].
[Source: (Al-Fawaa-id: page: 153-154). slightly paraphrased]