Two angels in Babylon through whom people were tested.
The story
A test in Babylon
In Babylon, two angels — — were a means of testing people. They taught no one until they had warned: we are only a trial, so do not disbelieve. Ibn Kathīr explains that some people learned from them what sows discord between a man and his wife, but they could harm no one except by Allah's permission.
The passage concludes that those who bought such knowledge had no share in the Hereafter, and that they sold their souls for an evil price, had they only known. Ibn Kathīr explains that the account warns against magic entirely: it is disbelief, however it is dressed.
Summaries of Ibn Kathīr's commentary on the linked āyāt, with authentic ḥadīth noted in the text where used. Verse links open Quran.com text and your chosen translation.