Ghosts and other form of spiritual entities can be classified under three categories: Benevolent, Benign, and Malevolent.
This type of haunting is of a protective nature. It is usually felt that the ghost or conscious energy is a loved one looking to protect the living people within an area in which a demon or other possibly malevolent entity exists. These types of ghosts are often found to be related to the living people within the area but have also been found to be closely connected to those being attacked.
This type of haunting usually happens when the ghost is unconcerned with the living or perhaps unaware of their presence in the location. This type of ghost can also be connected to an intelligent conscious energy or residual energy.
This type of ghost usually happens when a powerful conscious energy or perhaps a malevolent spiritual entity like a demon seeks to inflict harm on the living within an area. It is believed that this happens because the ghost is angry about the events that may have occurred in its life. It may also have a malicious personality, is jealous of the living, or an entity who is seeking attention or being defensive of its home and wishes for the current people living there to leave, or it is sad and want others to acknowledge its misery and sadness.
Poltergeist activities is usually confused with a malevolent haunting but often times it’s a spirit seeking attention or asking for help. A demon can be present if a murder occurred in the area. These types of haunting exist but they are very rare. You can study demonology so that you’ll have a basic understanding as to how it can be related to paranormal phenomena.