the "cpu" or dme or whatever you wanna call it is located behind the rubber kickwall in the rear-passenger side of the car. remove the screw caps, remove screws. peal back rubber, open pannel, and pull out the dme. be carefull of what you are pulling at and what you knock . the dme should slide out of its harness easily if you un-latch it properly. if you need more help with this you can always reply to this or your best bet is to maybe pick up some sort of maintainace manual.
Once you pull your DME (It's also called the ECU) you need to replace it with another unit. When you put the new unit in, depending on which model E36 you have the ECU needs to be programmed by either your dealer or an independent BMW mechanic equipped with a modic/DIS. Cost to program? Around $50-$60. How much is a New DME? Grab your ankles it may run anywhere from $600 on up... BTW, who told you that your DME was shot???