Praise be to Allah.
The questioner is mistaken in saying that she has seen a jinn, because the jinn can see us but they cannot be seen by us.
“Whoever is of sound character and claims to have seen the jinn, his testimony is no longer valid, because Allah says (interpretation of the meaning):
‘Verily, he and qabeeluhu (his soldiers from the jinn or his tribe) see you from where you cannot see them’ [7:27]
–unless he is a Prophet.”
Ibn Hazm said:
“The jinn are real, and they are creatures created by Allah. Among them are kafirs (non-Muslims) and believers. They can see us but we cannot see them. They eat, have children and die. Allah says (interpretation of the meanings):
‘O you assembly of jinn and mankind!’ [6:130]
‘And the jinn, We created aforetime from the smokeless flame of fire’ [15:27]
‘”And of us some are Muslims (who have submitted to Allah, after listening to this Quran), and of us some are al‑qaasitoon (disbelievers those who have deviated from the right path)’. And whosoever has embraced Islam (i.e. has become a Muslim by submitting to Allah), then such have sought the right path.
And as for the Qaasitoon (disbelievers who deviated from the right path), they shall be firewood for Hell”’ [72:14-15]
‘Verily, he and Qabeeluhu (his soldiers from the jinn or his tribe) see you from where you cannot see them’ [7:27]
‘Will you then take him (Iblis) and his offspring as protectors and helpers rather than Me’ [18:50]
‘Whatsoever is on it (the earth) will perish’ [55:26]
‘Everyone shall taste death’ [3:185].”
Hence what the questioner has seen may be just her imagination or an illusion, or it may be jinn appearing in a form other than that with which Allah has created them.
With regard to the jinn harming humans, this is proven to happen and it does happen. Protection against that is attained by reciting Quran and adhkaar (dhikr/remembrance of Allah) prescribed in sharee’ah (Islamic law).
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
“Undoubtedly the jinn can have a harmful effect on humans, and they could even kill them. They may harm a person by throwing stones at him, or by trying to terrify him, and other things that are proven in the sunnah (prophetic teachings) or indicated by real events. It was reported that the Messenger (peace and blessings of Allah be upon him) gave permission to one of his companions to go to his wife during one of the military campaigns – I think it was the campaign of al-Khandaq – as he was a young man who had recently got married. When he reached his house, he found his wife standing at the door, and he objected to that. She said to him, ‘Go inside,’ so he went inside and found a snake curled up on the bed. He had a spear with him, so he stabbed it with the spear until it died, and at the same instant as the snake died the man also died. It was not known which of them died first, the snake or the man. When the Prophet (peace and blessings of Allah be upon him) heard of that, he forbade killing the harmless kinds of snakes that are found in houses, apart from those which are maimed or are streaked and malignant.
This indicates that the jinn may attack humans, and that they may harm them, as is known from real-life events. There are numerous reports which indicate that a man may come to a deserted area, and a stone may be thrown at him, but he does not see anybody, or he may hear voices or a rustling sound like the rustling of trees, and other things that may make him feel distressed and scared. A jinn may also enter the body of a human, either because of love or with the intention of harming him, or for some other reason. This is indicated in the ayah/verse (interpretation of the meaning):
‘Those who eat riba (interest) will not stand (on the Day of Resurrection) except like the standing of a person beaten by shaytan leading him to insanity’ [2:275]
In such cases, the jinn may speak from inside of that person and address the one who is reading verses from the Quran over him; the reciter may take a promise from the jinn never to come back, and other things concerning which there are very many reports which are widespread among the people.
So the protection which will prevent the evil of the jinn is for a person to recite that which is narrated in the sunnah as being effective in providing protection, such as ayat al-Kurisy, for if a person recites ayat al-Kursiy at night, he will continue to have protection from Allah, and no shaytan will come near him until morning. And Allah is the Protector.’” (Majmoo’ Fatawa al-Shaykh Ibn ‘Uthaymeen)
The sunnah mentions adhkhar by means of which one may gain protection from the shayateen (devils). These include:
Seeking refuge with Allah from the jinn:
Allah says (interpretation of the meaning):
“And if an evil whisper from shaytaan tries to turn you away (O Muhammad) (from doing good), then seek refuge in Allah. Verily, He is the All‑Hearer, the All‑Knower” [41:36]
“And if an evil whisper comes to you from shaytaan, then seek refuge with Allah. Verily, He is All-Hearer, All-Knower” [7:200]
It was narrated from Sulayman ibn Sard that two men were trading insults in the presence of the Prophet (peace and blessings of Allah be upon them), until the face of one of them turned red. The Prophet (peace and blessings of Allah be upon him) said, “I know a word which, if he were to say it, what he is suffering from would go away: ‘A’oodhu Billahi min al-Shaytan il-rajeem (I seek refuge with Allah from the accursed shaytan).’” (al-Bukhaariand Muslim)
2 – Reciting al-Mu’awwidhatayn (the last two chapters of the Quran, al-Falaq and al-Nas).
It was narrated that Abu Sa’id al-Khudri (may Allah be pleased with him) said: “The Messenger of Allah (peace and blessings of Allah be upon him) used to seek refuge with Allah from the jinn and from the evil eye until the Mu’awwidhatayn were revealed, and when they were revealed he started to recite them and not anything else.”
(al-Tirmidhi, al-Nasaa’i, Ibn Maajah.
3 – Reciting ayat al-Kursiy
It was narrated that Abu Hurayrah said: “The Messenger of Allah (peace and blessings of Allah be upon him) put me in charge of guarding the zakah (charity) of Ramadan. Someone came to me and started grabbing handfuls of the food. I took hold of him and said, ‘I will take you to the Messenger of Allah (peace and blessings of Allah be upon him).’ He said, ‘I will teach you some words by means of which Allah will benefit you.’ I said, ‘What are they?’ He said, ‘When you go to your bed, recite this ayah (interpretation of the meaning): “Allah! La ilaha illa Huwa (none has the right to be worshipped but He), Al-Hayyul-Qayyoom (the Ever Living, the One Who sustains and protects all that exists)…” [2:255] – until he completed the ayah. Then Allah will appoint a guard for you who will stay with you and no shaytan (devil) will come near you until morning.’ The Messenger of Allah (peace and blessings of Allah be upon him) asked me, ‘What did your prisoner do last night?’ I said, ‘O Messenger of Allah, he taught me something, and claimed that Allah would benefit me by it.’ He said, ‘What was it?’ I said, ‘He taught me to recite ayat al-Kursiy when I go to bed, and said that no shaytan would come near me until morning, and that Allah would appoint a guard for me who would stay with me.’ The Prophet (peace and blessings of Allah be upon him) said, ‘He told you the truth, although he is an inveterate liar. That was the shaytan.’” (al-Bukhaari)
4 – Reciting Surat al-Baqarah
It was narrated from Abu Hurayrah that the Messenger of Allaah (peace and blessings of Allah be upon him) said: “Do not make your houses like graves, for the shaytan runs away from a house in which Surat al-Baqarah is recited.” (Muslim)
5 – The last verses of Surat al-Baqarah
It was narrated that Abu Mas’ood al-Ansari said: “The Messenger of Allah (peace and blessings of Allah be upon him) said: ‘Whoever recites the last two verses of Surat al-Baqarah at night, that will suffice him.’” (al-Bukhaari, Muslim)
It was narrated from al-Nu’man ibn Basheer (may Allah be pleased with him) that the Prophet (peace and blessings of Allah be upon him) said: “Allah inscribed a book two thousand years before He created the heavens and the earth, from which the last two ayahs of Surat al-Baqarah were revealed. If they are recited for three nights, no shaytan (devil) will remain in the house”. (al-Tirmidhi).
6 – Reciting “La ilaha ill-Allah wahdahu la shareeka lah, lahu’l-mulk wa lahu’l-hamd wa huwa ‘ala kulli shayin qadeer (There is no god except Allah Alone with no partner or associate; His is the Sovereignty and His is the praise, and He is able to do all things)” one hundred times.
It was narrated from Abu Hurayrah that the Messenger of Allah (peace and blessings of Allah be upon him) said: “Whoever says “La ilaha ill-Allah wahdahu la shareeka lah, lahu’l-mulk wa lahu’l-hamd wa huwa ‘ala kulli shayin qadeer” one hundred times in the day, will have a reward equivalent to that of freeing ten slaves, one hundred hasanahs (good deeds) will be recorded for him, and one hundred sayiahs (bad deeds) will be erased from his record, and it will be protection for him from the shaytan for that day, until evening comes. No one could achieve any better than him except the one who does more than he did.”
7 – Remembering Allah often (dhikr)
It was narrated from al-Harith al-Ash’ari that the Prophet (peace and blessings of Allah be upon him) said: “Allah commanded Yahya ibn Zakariya (peace be upon him) five things to follow and to enjoin upon the Children of Israel… and he commanded them to remember Allah, and the likeness of that is a man who was being pursued by the enemy, until he reached a strong fortress in which he found protection; similarly a man cannot find protection from the shaytan except by remembering Allah…” (al-Tirmidhi)
8 – The adaan (call to prayer)
It was narrated that Suhayl ibn Abi Salih said: “My father sent me to Bani Harithah, and there was with me a slave of ours, or a companion of ours. Someone called out his name from a garden, and the one who was with me looked into the garden and did not see anything. I mentioned that to my father, and he said, ‘If I had known that this was going to happen to you, I would not have sent you. But if you hear a voice then make the call for prayer, for I heard Abu Hurayrah (may Allah be pleased with him) narrating that the Messenger of Allah (peace and blessings of Allah be upon him) said: “When the shaytan hears the call to prayer, he runs away fast.”’” (Muslim).
The word translated here as “runs away fast” may also mean “passes wind.”
9 – Reciting Quran offers protection against the shaytan
Allah says (interpretation of the meaning):
“And when you (Muhammad) recite the Quran, We put between you and those who believe not in the Hereafter, an invisible veil (or screen their hearts, so they hear or understand it not) [17:45]
And Allah knows best.