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.
Undoubtedly every person has their own Jinn companion, as stated in authentic Hadeeth. In a Hadeeth on the authority of ‘Aa’ishah the Prophet , mentioned that every person has a devil - even the Prophet himself - but Allaah supported him over his devil until he subjugated him. [Muslim]
Realizing this fact, there is no impediment for the companion to behave in a way that harms man, although we cannot generalize, that is, say that every harm a person faces is caused by his companion, because it is Allaah alone who is well aware of the reality.
Therefore, for a person to protect himself from the evil of this companion, they must resort to their Lord, Allaah The Almighty, by supplicating to Him for protection from the evil of all creatures, both Jinn and humans, and regularly observe the morning and evening 'Athkaar (mentionings and remembrances of Allaah).
Allaah Knows best.