All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
This worldly life is a test in which Allaah tries his servants with various hardships in order to distinguish the patient people from the non-patient ones. Allaah Says (which means): {And We will surely test you until We make evident those who strive among you [for the cause of Allah] and the patient, and We will test your affairs.}[Quran 47:31]. So, we advise you not to be anxious as anxiety does not repel harm or bring a benefit. The Prophet said: "The greatness of the extent of the reward is proportional to the greatness of the affliction. When Allaah loves some people, He afflicts them. So, those of them who are content get the reward of being content while those who get angry get the punishment of being discontent." [Ahmad]
Therefore, the hardships that a person experiences could be a mere test from Allaah; Allaah may test him in order to forgive his sins and raise his status. The Prophet said: "A believer, male or female, is continuously afflicted in himself/herself, in his/her children and in his/her wealth until he/she meets Allaah without a sin." [At-Tirmithi] The calamity that befalls a person could also be because of a sin that he committed. Allaah Says (which means): {And whatever strikes you of disaster — it is for what your hands have earned; but He pardons much.}[Quran 42:30]. So, one has to repent and seek forgiveness and do righteous deeds as much as possible.
However, if you are sure that magic is done to you, you have to seek Ruqyah. There is no harm in asking a righteous person who has a correct belief to perform Ruqyah on you but you should never go to magicians or fortune-tellers. Anyway, you should supplicate as much as possible in all cases, perform your religious obligations and refrain from doing acts of disobedience. Besides, you should mention Allaah as much as possible and recite the morning and evening legislated mention of Allaah.
Finally, it should be noted that you should be careful of accusing some people of doing magic to you without evidence as in principle a Muslim is innocent until he is proven guilty. So, you should not accuse others of doing magic to you just because someone else suggested the case to be so, as this could lead to hatred, family break up and cutting of relations.
Allaah Knows best.