How do you know if someone is doing black magic?

There is no such thing and for protection is to read Quran and says against any satanic whispering.