Yea its right, people who met terrible/violent deaths or died before their time.
Sikhism teaches that upon our death our soul will either find eternal peace as it merges back with God or it will be assigned back to the samsara cycle of reincarnation, depending on our actions and our fo-cus in life.
The samsara cycle is designed to take us back to our true home of God, but Maya (attachment) keeps us bonded to this cycle. Maya includes our minds being ruled by lust, anger, greed, attachment and pride.
Part of the samsara cycle could include living as a ghost or soul on the earthly plane for hundreds of years before we are given the privilege of human life again. This is a form of karmic suffering.
The Shri Guru Granth Sahib Ji says:
He commits many millions of sins. Day and night, he does not get tired of them, and he never finds release. ||1||Pause|| He carries on his head a terri-ble, heavy load of sin and corruption. In an instant, he is exposed. The Messenger of Death seizes him by his hair. ||1|| He is consigned to countless forms of reincarnation, into beasts, ghosts, camels and donkeys. Vibrating and meditating on the Lord of the Universe in the Saadh Sangat, the Company of the Holy, O Nanak, you shall never be struck or harmed at all. (SGGSJ, p.1224)
The ghost (soul), in the body-cage, suffers all sorts of afflictions. Those who are blind to spiritual wis- dom, remain in hell (samsara cycle). The Righteous Judge of Dharma collects the balance due on the account, of those who forget the Name of the Lord. ||6|| (SGGSJ, p.1029)
So it is in Gurbani -
Kai Kot Jachh Kinnar Pishach,
Kai kot Bhot Pret Sukar Mrigach
Kai mean many
Kot mean crore
Jachh is slang from Yaksha a type of human like entity(refered as human only in Akalustat)
They could be native of Sri Lanka before Sinhalees from north India sttled there.
Kinnar are men from high mountain from Kinnaour of Himachal Pradesh(both are refered in hindu mythology also as semi or full divine man like creatures).
Pishach is a type of Ghost ,which is vampire
Bhot and pret both are used for ghost.
Pret could be a ghost never been in human body while bhoot is ghost at least been born as human or may be other body and yet to be salvaged.
Suker is pig.
Mrig is deer.
On the subject of ghosts, I was told as a kid that ghosts are the spirits of people who died before their time, i.e. committed suicide. They cannot enter heaven/hell and must roam the Earth until their preordained time of "natural" death.