If your car with an automatic transmission is stuck in a certain gear and refuses to shift up or down, there are two common causes. The first is that a solenoid in your transmission, which is the way that your car's computer mechanically engages gear changes, has become stuck. The other cause is that your car may have activated something called "limp mode" due to faulty sensors. Both of these problems can be corrected by an experienced mechanic at a transmission shop. You'll want to have your car serviced as soon as possible, because being stuck in one gear is a definite road safety issue.
One Of Your Transmission Solenoids Is Stuck
Your automatic transmission shifts gears due to the action of the transmission solenoids; your car's computer constantly monitors the speed you are traveling and the RPM of your engine using its sensors to make a determination of what gear the automatic transmission needs to be in. When it senses a gear change is required, the computer sends an electrical signal to activate the corresponding solenoid in your transmission, which opens the solenoid and allows transmission fluid to flow through it, which supplies pressure to the bands that shift your car into the requested gear. If the solenoid is stuck closed, your car will not be able to shift into that gear; if it's stuck open, your car will not be able to shift away from that gear.
The most common cause of a stuck solenoid is not changing your transmission fluid according to your vehicle's recommended schedule. Over time, small bits of metal and debris will enter into your transmission fluid; this is responsible for the black coloration that transmission fluid has when it badly needs to be changed. When the dirty transmission fluid is pushed through the solenoid, these small bits of metal become stuck in the solenoid and prevent it from closing, meaning that your vehicle will be stuck in one gear until the affected solenoid is replaced. It's important to regularly have your transmission fluid changed at a transmission shop in order to prevent problems with your transmission such as a stuck solenoid.
You'll need to bring your car to a transmission shop in order to have the affected solenoid replaced. Solenoids are very simple and inexpensive parts and replacing a stuck solenoid is a fairly short procedure.
Your Car's Transmission Has Activated "Limp Mode"
Since your car uses its sensors to make its determination on when switching gears is necessary, there's a special fail-safe mode that is activated when the car's computer cannot read the sensors or determines that the readings from the sensors are not sensible. When that happens, your car's transmission goes into what is commonly referred to as "limp mode." Since your car doesn't have the necessary information to switch gears safely, the transmission will shift into either second or third gear (depending on the make and model of the car) and stay there. This is a safety feature that allows you to drive your vehicle to a transmission shop while preventing damage to the transmission.
If your car is stuck in gear, it's important to take it to a transmission shop as soon as possible to have it serviced; however, it's important to be safe while you are doing this. A car that is stuck in limp mode can be a road hazard, as you will not be able to safely merge into oncoming traffic that is moving at a high speed. In these cases, it's better to have your car towed to a service center instead of attempting to drive.