In a manual transmission, the output gears are locked onto the output shaft using synchronizers, also known as synchro rings. These components match the speed of the gears to the speed of the output shaft, allowing them to engage, or 'lock', smoothly without grinding. In an automatic transmission, planetary gearsets and clutches are used to achieve this.