Both is possible. But ghosts can’t follow. They’re attached to the place, or the object. If you take the object with you, it will follow the object, not you.
On the other hand, there are also demons that haunt the places or people. If a place is haunted by demons, it means that place is either sacred to them, or it’s a gate and both situation means you’d have to run for life as soon as possible before you anger a demon or something else. Because if it’s a gate that means there are not just demons there. There could be any kind of creatures that you can or cannot see.
Also if demons are angered or fell in love with you, they would follow you anywhere you go. Unlike ghosts, demons can touch you. I mean physically. They can harm you or heal you. Anything you can think of. There are some cases that demons raped people in their sleep or even in shower.
But ghosts… They can’t do anything but appearing or making weird noises. There’s no such thing as poltergeist ghosts. It’s actually demons. Demons are shapeshifters. They can look like anything they want. If they want to scare you, they will look like something you are terrified of. Since many people are afraid of ghosts, because they don’t know any better, demons would appear them as ghosts of possibly some relative that had died. That’s the reason why some people believe ghosts are poltergeists.
And how to protect yourself once you face them… You can’t. Cross, holy water, the exorcism prays that are in bible or some books that’s been recently published won’t help you. Because they are false beliefs. All you can do is to run and get inside the nearest human crowd.
The demon you’d come across probably wouldn’t physically hurt you, though they could. But it is not allowed for a demon to hurt a human-being unless the human is a threat to demon - itself or to the place - thing that is sacred and they have to be in the protection of. But that doesn’t mean you shouldn’t be scared. Because once you are terrorized by them you will lose your mind.