After an emotionally and physically exhausting day, the disciples finally escape on a boat away from the crowds, even away from Jesus who has decided to spend the night praying up in a mountain. At last they have their rest. But some hours later the wind picks up and waves begin to batter the boat. Then in the dead of night they see someone walking toward them over the surface of the water. They are terrified. They think it is a ghost.
Skeptics have tried to explain away the miracle of Jesus walking on water. I heard one explanation that Jesus was actually walking along a sand bar that extended out to sea, and the disciples were fooled into thinking Jesus was doing something miraculous. But the disciples' boat would have had to be relatively close to the shoreline for that to be possible, and the text says that they were already "many stadia away from the land" and had been sailing for half the night. This suggests they were probably about a mile or two from shore. As far as I know, no sandbar stretches out that far.
What's more the fact that the disciples thought Jesus was a ghost adds a note of credibility to this account, it seems to me. If this story were made up, you would write it so that the disciples gaze out into the sea and immediately recognize that Jesus is walking on water. "Wow, look, it's a miracle! Jesus, you truly are the Son of God!" Worship, worship, worship. Right? But instead the disciples behave much more realistically than that. In order to understand this, imagine for a moment how it would be if you were to see someone walking on the sea with only the faint light of the moon and stars to help you discern what you were looking at. Seriously, put your imagination to work and try to be there with the disciples. You know that water cannot hold the weight of a flesh and blood human body, so when you see that thing coming toward you your mind would leap to the immediate assumption that this being must not be flesh and blood, but a weightless spirit. That's why the disciples thought Jesus was a ghost. It wasn't because he looked particularly white or transparent or made spooky noises; it was a primal reaction to the freakiness of the whole scene, because the human mind is programmed to interpret everything it perceives through the natural laws of physics. If you see someone walking on water in very dim light, of course you're going to react with "ghost!" and not "hmm, maybe someone is miraculously walking on water." But this is not the sort of detail you would know to put in a story that is fabricated. Because the only way you could know that you'd react this way is if it actually happened.