On page 16, Allah عَزَّ وَ جَلَّ recounts an incident from Prophet Sulaiman time when devils spread false teachings about magic. Sulaiman did not disbelieve, but the devils did, using angels Harut and Marut to spread magical knowledge as a trial.
The magic caused discord between spouses, but harm or benefit only occurred with Allah's permission. Those practicing magic harmed themselves and excluded themselves from the hereafter.
The verse emphasises that belief, guarding against evil, and fearing Allah عَزَّ وَ جَلَّ bring a far better reward. Believers are advised to use respectful language with the Prophet, and Allah, in His mercy, chooses recipients of goodness according to His will.