The transmission solenoid is one of several hydro-electric valves with a spring-loaded plunger inside. Its operation is determined by the ECU (on-board computer). This computer uses data gathered from sensors positioned around the vehicle to decide which gear to use.
The job of the transmission solenoid is to control the flow of transmission fluid in an automatic transmission and can be open to allow the fluid to flow, or closed. The ECU tells the transmission solenoid whether to remain open or not. To open the solenoid the ECU sends a current through a coiled wire on the solenoid, allowing the fluid to flow through. This wire is wrapped around a plunger. With the transmission solenoid open, the transmission fluid then flows to the clutch, allowing the driver to change gears. Some solenoids have the ability to change multiple gears, whilst some only operate one.
Problems with the transmission solenoid can mean that the vehicle loses the ability to change gears. It can fail because of damage to the solenoid as a result of electrical issues, or it could be caused by dirty transmission fluid which can make the solenoid stick.