Hell ghosts are not normal ghosts, which are the spirit of a person who remains connected to the mortal realm but souls from hell that can manifest as ghosts they once were and also inhabit corpses, reanimating them as zombies.
After Castiel calls on God to help deal with a soulless Jack, he appears appears with a solution - a weapon that will kill Jack but also the person who wields it. Dean takes the weapon, and tracks Jack and Castiel to a cemetery. Dean ultimately refuses to use the weapon but Chuck kills Jack himself. Sam reveals Chuck merely creates worlds and abandons them when he is bored, and that he has manipulated the Winchesters their whole life for his amusement. Sam uses the weapon to shoot Chuck which enrages him. He tells them the story is over and welcomes them to the end.
The sky goes dark, and souls from Hell erupt from a crack in the ground. Several appear as ghosts previously defeated by the Winchesters appear: a man pulls his car over upon seeing the Woman in White aka Constance Welch, a mother opens the door to find John Wayne Gacy in his Pogo the Clown outfit, and Bloody Mary aka Mary Worthington appears in a young girl's mirror.
In the cemetery, Castiel and the Winchesters are surrounded by a horde of the undead now reanimated.