ANSWER: Surprisingly one reference to ghosts in the Bible involves Jesus' disciples using the word to describe HIM! Jesus had his disciples get in a boat and go to the other side of the lake while he went up a hill to pray (Matthew 14:22 - 23). Sometime in the middle of the night, as the boat was being tossed about by the waves, Christ stopped praying and began walking on WATER toward the ship.
25 Between three and six o’clock in the morning Jesus came to the disciples, walking on the water. 26 When they saw him walking on the water, they were terrified. 'It’s a ghost!' they said, and screamed with fear (Matthew 14:25 - 26)
From your Email, however, it looks like what are called ghosts are actually rebellious, evil spirit beings (demons). To determine if demons are involved, we suggest you first do some thorough investigating. Children of a young age many times do have imaginary friends. It is their process of maturing to become sociable beings. Children generally have a great imagination that is healthy. When they become older, they outgrow their imaginary friend and make real friendships. Make sure the son does not really see John. If he merely talks to a friend, then he probably is playing a friendship game.
Secondly, you mention things move and doors open by themselves. Check and be sure they really move where your friend sees them move. Wind can close doors. Check to see if your friend really observes doors closing without any draft.
If after all your investigation these events prove out to be real, then demons are likely. In Matthew 12, Christ discussed when a man has an unclean spirit (demon) in his house and a demon leaves. When the evil spirit cannot find any place to go, he takes more unclean spirits and goes back to the house he came from. The problem is serious according to the Bible.
43 When an evil spirit goes out of a person, it travels over dry country looking for a place to rest. If it can’t find one, 44 it says to itself, 'I will go back to my house.' So it goes back and finds the house empty, clean . . . 45 Then it goes out and brings along seven other spirits even worse than itself, and they come and live there . . . (Matthew 12:43 - 45)
As Jesus stated, a person can have a demon leave them, but if they do not put something in their lives to fill the void (like God), they can end of worse than before the evil spirit left (verse 45)!
In Matthew 17, the disciples came to Jesus saying they could not cast out demons from this son who would throw himself into the fire and water. This was a very difficult demon problem (Matthew 17:14 - 21). As the Bible shows, He said they did not have enough faith. However, He also said this was such a severe demon problem that the demon or demons would only leave by fasting and prayer.
Therefore, if you find this is a real unclean spirit problem, both your friend and his son should pray together. They, in the name of Jesus Christ, should ask God to remove the demon and have it never return. We, on our own power, cannot remove ghosts or demons. The Jesus of the Bible, however, can if you have the faith. If this does not do it, move. It is not worth staying there. Your friend and his son need a healthy environment to grow.