>>96351827I'm probably going to sound like a retard for saying this, but here's my theory.
When the people who would become ghosts die, they start out like Sidney Poindexter. They still looked like how they did when they were alive and they only have a few default ghost powers (Walk through wall, disappear, fly, etc.). They also had a better recollection of their past lives, again, as seen with Sidney. However, once they enter the Ghost Zone, most of them end up corrupted due to a large amount of emotional and psychological baggage they harbored in their souls because they didn't die peacefully. So, their actual souls are forced out of their ethereal bodies to ascend to the afterlife while the husks that are left behind create their own souls based loosely on the original. As a result, they come back to the mortal plane, evil and empowered.
There are exceptions, though. Sidney seemed to be trapped in his own pocket dimension within the Ghost Zone and unlike most of the other ghosts, he didn't gain any new crazy powers. By the time he actually goes to the Ghost Zone, he had already gained the respect of his peers for fighting Danny Phantom. Thus, he was able to pass into the Ghost Zone peacefully with his soul intact. The Dairy King is another exception. He's seen wandering around Vlad's mansion, but unlike Sidney, he's not actively malicious. He likely passed away peacefully and went into the Ghost Zone unscathed. He just decided to wander around Vlad's mansion because he felt more comfortable there.
TL;DR: They're spirits, but at the same time, they mostly aren't.