Your phone opened Instagram by itself. Then it typed "jjjjjj" to your boss. Spooky season, sure, but that's not a ghost. It's ghost touch.
That's when the screen registers taps you never made. Apps launch, the keyboard goes rogue. Funny until it sends something.
The boring culprits first
A wet or greasy screen can confuse the touch layer, so dry your hands and wipe the glass. Oceanside's marine layer mornings leave a damp film on everything, phones included.
Then look at the screen protector. A cracked one, or one with a bubble creeping in from the edge, can fake taps all day. Peel it off and test the phone bare.
If the ghost only shows up while the phone is plugged in, suspect the charger. Some cheap ones make touch jumpy. Swap it and see if the haunting stops.
When the ghost is hardware
Dry screen, no protector, no charger, still tapping on its own? Then it's probably the screen. Even a small corner crack can damage the touch layer underneath. So can a cheap replacement screen from an earlier repair.
One I take seriously: if the display looks like it's lifting, or there's a gap along the edge of the phone, the battery may be swelling and pushing on the screen. Stop charging it and don't press it back down. More on that in my swollen battery post.
Wiped it, ditched the protector, tried another charger, and it's still possessed? That's a screen repair, not an exorcism. I come to you in Oceanside, Carlsbad, Vista, San Marcos or Escondido. Tell me the model and what it's doing.