All speculation, and I’m really not sure what I believe – but it’s definitely a stimulating thing to think about. There are so many possibilities, each one with different consequences. I’ve had some “ghostly” experiences that I can’t explain, but that doesn’t mean there’s not an explaination.
One theory I like to think about is this: what if a “ghost” is an impression left in the fabric of space/time by someone or something in the past? Maybe someone felt something so strongly that it left an indent. This theory would be supported by the tendency of “ghostly encounters” to be repetitive and not interactive. For example, lots of ghost stories involve a ghost that will appear at the same time every night, or do the same thing every time it’s seen. If this is the case, then there is nobreason to be afraid, because they are not sentient creatures, could not be aware of you, and cannot hurt you.
Keep thinking about all the possibilities, but don’t be afraid :)