Most don't, some do. Most trains are either diesel-electric (like a hybrid car) or straight electric. Some are direct drive diesels, and these are the only ones that would require a transmission in the same sense as your car. Final drives are common in lots of trains, but they're fixed ratio gearboxes.