Haaroot and Maaroot were two angels who were sent as a test for a certain group of the Banu Israaeel. They would inform whoever came to them that they were a test from Allah and discouraged them from learning magic but if the person insisted they would teach him. This magic was able to cause hatred between husband and wife and therefore cause separation.
Whatever the case, black magic is prohibited in every form.
and Allah Ta’ala Knows Best
Mufti Ebrahim Desai