Intelligent undead monsters will act as evil intelligent creatures. And as libris Mortis shows, some of them have craving for some type of material or energy, and some others are diet dependent. Those without such hunger will act as uttery evil intelligent beings.
But regarding mindless undead creatures without such huger, It may be DM's call. It may do nothing unless commanded, like mindless constructs. Or they may mimic the behavior of the living version of it say (I guess, say, bone rat swarm will eat anything they meet though they are mindless and has no craving nor diet dependency). Yet others may just attack every living things they meet, as they are driven by negative energy anyway.