Monsters in ghost form appear transparent and are impervious to normal man-made weapons to quote the game manual. Such attacks will go through the ghost as if they are not there.
Below are the attacks that ghosts are immune to. Though whether they could all be considered "man made" is open to debate;
Both normal and powered up attacks by the Staff The smaller bolts fired by the Crossbow The Phoenix Rod missile (though ghosts can still be hit by its splash damage) Both normal and powered up attacks by the Fire Mace The Undead Warriors Green and Red Axes (though the Undead Warriors melee attack can hit a ghost)
From a modders perspective, any shootable thing can be given the "mf_shadow" flag to make it a "ghost", whilst any missile can be given the "mf2_thrughost" flag to make ghosts immune to it.
The actions used by the Disciple of D'sparil to switch in and out of ghost mode are "A_WizAtk1"and "A_WizAtk2". These give and remove the "mf_shadow" flag from the thing who the states belong to. Both make the Disciple face its target as well.
"A_GhostOff" does the same thing as "A_Wizatk2" without making the Disciple face its target. It is used to force the Disciple of D'sparil out of ghost form if it enters it's pain states while attempting to attack.