And on an automatic, it's one of the inputs to the three position solenoid that controls transmission pressure. With your foot off the gas peddle, the switch is closed and causes the three position solenoid to shift to the lowest pressure setting. This cause the transmission to downshift softly as you decelerate. When you hit the gas, the switch opens and the solenoid shifts to the mid pressure setting which gives crisp up-shifts as you drive. The other input is the kickdown switch under the gas peddle that closes when you floor it. That shifts the solenoid to the highest pressure setting which delays shifts until higher rpms, and provides the most firm shifts.
The constant speed solenoid I'm pretty sure is controlled by either of two pressure switches on the transmission. One switch activates in reverse and the other in forward. Either one activated will energize the constant speed solenoid. The reverse sensor also controls the backup lights.