The skin burning sensation is carried to the brain by nerves. However if the nerve endings at outer skin is damaged no signals would be carried to the brain, hence no burning sensation is felt.
The Quran says that those who will burn in hell their skins will be replaced with new ones every time it is roasted so that they may feel the pain:
[Quran 4.56] Those who disbelieve in Our verses, We will drive them into a fire, every time their skins are roasted We will replace their skins with other new skins so that they may taste the torture. Allah is ever Exalted in Might and Wise.
How could an illiterate man who lived 1400 years ago have known that only outer skin can feel burning?