Usually it is the Stepper (air distribution) valves that have malfunctioned. Wehn you start the car or shut it down you often hear a buzzing sound, these are the stepper valves resetting to a default position. Go to http://bmwe32.masscom.net and check out this site for a better explanation.
There's a water pump behind the dash on an e38 which controls whether warm air comes out of a particular side.
Cost me about £170 for the part. Dealer to fit is another £120 I think.
I am more an E32 person and there is an auxiliary heater valve that sits in front of the driver (USA versions) that can cause problems, but in my limited experience it has been the stepper (air distribution ) motors that have given me grief. These devices, nine on my car, (1988 750il) open and close the vents to allow conditioned air to flow.