Question:

How does one remove the effect of magic?

Answer:

Verily the praises are to Allah, and may Allah’s peace and blessings be
upon prophet Muhammed.

Magic has an adverse affect on one’s comprehension. One should
study the beneficial knowledge from our noble ulema to counteract
this evil affect. One should try their utmost to learn this knowledge,
and Allah willing it will remove the evil effect. One should try to
spend much time in the environments of ilm.

And Allah knows. Shaikh Sajid