Al-jawab billahi at-taufeeq (the answer with Allah's guidance)
To practice Sihr (majic) knowing or not knowing is totally haraam and a major sin. If a person believes and regards this practice as permissible, it results in Kufr & Shirk.
There are two rights (Huqooq) that one must fufill in order to become clean from the sin commited and punishments.
1) Huqooq-ul -Allah (Allah's Right)
Is the person who repents from Shirk whether small Shirk or major, Allah forgives his previous Shirk and accept his repentance. Allah Ta'ala Says : "Say to those who have disbelieved, if they cease (from disbelief) their past will be forgiven. �" [8: 38].
Also, Allaah Ta'ala says : "Say: 'O My slaves who have transgressed against themselves (by committing evil deeds and sins! Despair not of the mercy of Allaah; verily, Allaah forgives all sins. Truly, He is Oft-Forgiving, Most Merciful'. [39:53].
The Prophet (Sallallahu Alaihi wa Sallam) said: "Islam (i.e. converting to Islam) wipes out all the previous (misdeeds)" [Reported by Imam Muslim ].
2) Huqooq-ul-i'bad (Muslim right)
One must ask forgiveness from the person he caused the harm to and try to undo the harm caused.