All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
Ibn Mas’ood narrated:
“The Messenger of Allah performed the 'Isha prayer, then he left, taking the hand of 'Abdullah ibn Mas'ood, until he took him to the wide valley of Makkah. He sat him down, then drew a line around him, and said, ‘Do not go beyond your line, for indeed some men shall come to you, but do not speak to them, for they shall not speak to you.’ Then the Prophet went to where he wanted to go, and while I was sitting within the line, some men who appeared as if they were from Az-Zutt (dark people), with black hair and bodies, came to me. I did not see their nakedness nor their covering. They ended up before me, but they did not pass the line. Then they returned toward the Prophet …” [Excerpted] [At-Tirmithi and Ahmad (this is the wording of At-Tirmith); Al-Albaani classified it as saheeh (sound)]
The wording of Imaam Ahmad reads, “…He drew a line around me and said, ‘Stay within this circle and do not come out of it; if you come out of it, you will perish.’ I stayed within the line ... They did not have clothes on them, but I did not see their ‘Awrah (what should be covered of the body); they were tall and slim…”
The wording of Al-Bazzaar reads, “Do not leave your line, and if anyone comes to you, do not speak to him…”
Ibn Al-Atheer said in An-Nihaayah about the word Az-Zutt, “They are a race from the Sudan and the Indians.”
Lisaan Al-‘Arab authored by Ibn Manthoor reads, “Az-Zutt: black people from Sind.”
In brief, Ibn Mas’ood described them as tall and black.
As regards your question whether it is permissible to use such a line or a circle for protection from the jinn, then the answer is that ‘Abdullah ibn Mas’ood did not make this line himself, and the Prophet did not tell him that if he would go out of that line he should make another one for himself; rather, the Prophet forbade him from leaving the line; this indicates that the line was one of the miracles of the Prophet .
We have not come across any scholar who generalized this and said that it is permissible to make a line in order to be protected from the harm of the jinn.
Allah knows best.