Press on the ghosts to make them dissolve. There's only one ghost you can't kill, the one that moves around.
Happy Halloween, I'm posting this early because I have something to do on Halloween.