I'd imagine the soul gives them some form of self preservation, as to their thought process it probably goes something like "Intruder. Kill." Zombies just obey what their necromancer has "programmed" them to do. Ghosts are quite a different matter, they appear to have varying levels of intelligence, there are the ones you commonly kill, that just moan and lounge about, and then theres ghosts that can actually speak to you, like the ones in the KOTN priory.
That seems right. However, are skeletons bound to any mission or area, or are they free? You were referring to skeletons in that first sentence, right? I imagine zombies are like mindless animals and their instinct is what guides them, or in some cases, a necromancer's order are their instincts. Skeletons seem a bit more intelligent though, just because they can wield weapons, especially a bow. Ghosts are basically body-less souls right? Are the ones that just groan and lunge about sapient? They are the souls of people, so how can they not be intelligent?