Ghosts behave like Wraiths, hovering above the ground and passing through solid tiles to reach the player. In order for ghosts to travel up to players, they must have a solid block to pass through, or else they will stay hovering just above the ground.
Tips
Ghosts can be attacked through walls with melee weapons that cannot usually hit through walls – this makes spears and whips especially effective. Both are still great for dealing with large hordes of ghosts, because can hit many of them at once.
In Journey Mode, even when the enemy spawn rate is set to 0× the normal rate, mining up Tombstones may still cause Ghosts to spawn.
Trivia
Strangely, the Ghost's attack decreases in ExpertHardmode, rather than increasing.
The Bestiary entry for the Ghost: "During the most harrowing times, these apparitions float aimlessly through the depths to steal the life from those they envy."
Desktop 1.4.1: Decreased damage from 18 to 15, defense from 8 to 4, and maximum health from 70 to 50, and increased knockback resistance from 40% to 50%.
Desktop 1.4.0.2: Ghosts are more likely to despawn, and the conditions which allow them to spawn has been reduced as well as the maximum number of them.