Like Tridus, I cannot give a official explanation on how it works because there is none detailed enough ( I am not talking about the mechanics, but the theoric base of how it works). I can, however, give the one I use when asked:
A cleric using its turn undead ability, depending on his patron deity and/or alignment, gains the ability to channel either positive energy or negative energy.
The positive energy is linked to life, and is the force that powers up healing magic. Negative energy is linked to death, and powers up most magicks tied to necromancy.
Undead beings are closely tied to negative energy also. Incorporeal undead are souls that refuse going to their final rest, and corporeal undead are corpses reanimated to a mockery of life, some of them devoid of sentience save the most basic instincs, while others still retain its original, albeit greatly corrupted, soul. In all cases, negative energy is the power that allows them to continue their antinatural existence, using it to forcefully isolate themselves from the cycle of life and death.
When a cleric channel negative energy into a undead creature, it is overcharged with negative energy, producing in it the equivalent of what a intoxicated state would cause on a living being. A ligth intoxication merely confuses and disorient the creature, making it stop and cower in awe. A heavy dose of negative energy completely overloads its system, making it controllable. Unintelligent undead are simple hijacked, their basic instincs overwritten with the orders of the cleric. Intelligent undead become instead vulnerable to suggestion, as the clerics commands are implanted in their psyche through the link created by the energy transference.
Channeled positive energy, on the other side, has dramatically different effects. Minor or medium doses of life-giving energy weakens the barrier that isolates the undead from the natural order. This makes the undead become alive for a brief moment. The shock caused on a soul that return to a cuasi-living state (non-sentient undead gain some sort of animalistic sentience), when confronted with the reality of its existence as a undead being, overwhelms it with a mix of fear, sorrow and despair, making it flee the source of its pain: the cleric. A really big dose of positive energy completely breaks the barrier, returning the affected undead to the natural order, and thus destroying it.