So say there is an automatic transmission in a car. Is there a computer inside the transmission that decides to change gears, or is there a computer in the car that tells the transmission to change gears? If the computer is in the transmission, how does it decide to shift? What about it's in the car?
It depends on the transmission manufacturer and the model of the transmission. In the '80s and before, an automatic transmission was controlled by a vacuum actuator and a cable which ran to the throttle (called a TV cable). Later in the '90s, when electronic engine management came into play, transmissions started being controlled by a main computer in the car (or Powertrain Control Module - PCM). This controlled a lot of aspects of the tranny, to include shifting, line pressures, torque converter lockup and other operations. Sometime later, some manufacturers started dividing the Transmission Control Module (TCM) and Engine Control Module (ECM) back out so there are actually two controllers doing the work, while talking to each other.
Shifting the gears is dependent on several different factors, such as engine load, throttle position, speed of the vehicle, engine speed, etc. Every manufacturer does it a little different, so I won't try to go into it.
Engine speed : Only if engine spped is high enough it can shift to next gear
Speed of car:It will not downshift unless spped of car is lesser, else the engine will over rev
Load on Engine:If load is too high, then it must use a lower gear to obtain the required pull. Like on slopes, or a heavier car.
Pedal position:If your pedal is floored, you directly order the engine to downshift for quick power.
Apart from this there are some automatics there which learn your driving patterns. Then there are AMTs..