The Transmission Control Module controls the shifting of the automatic transmission by using "fuzzy logic" to continually assess your driving situation (uphill, level, gas pedal position, car speed, etc.) and choose the best possible shifting point for the transmission. I believe these modules are coded to specific VIN #s on the car so you have to probably go to the dealer for this item, or at least to know the proper code if you buy the TCM aftermarket.
Here's some GENERAL INFO on automatic transmissions. In this article, they call a TCM a "PCM" but it's the same general idea