There is only one recorded incident in the Scriptures of the spirit of a dead human seeming to appear to someone, that of Samuel appearing to Saul . And Saul knew that it was Samuel, and he bowed with his face to the ground, and did obeisance. Because you did not obey the voice of The Lord, and did not carry out his fierce wrath against Amalek, therefore The Lord has done this thing to you this day. They usually appeared in the form of humans, who identified themselves in a clear and dignified manner, while bringing a message or on a mission from God. There was no nonsense.
Demons are fallen angels who have become warped in thought and behavior.
And they are nothing to worry about for the converted Christian.