Animation courtesy Geebee's Vector Animations
The five-speed manual transmission is fairly standard on cars today. Internally, it looks something like this:
There are three forks controlled by three rods that are engaged by the shift lever. Looking at the shift rods from the top, they look like this in reverse, first and second gear:
Keep in mind that the shift lever has a rotation point in the middle. When you push the knob forward to engage first gear, you are actually pulling the rod and fork for first gear back.
You can see that as you move the shifter left and right you are engaging different forks (and therefore different collars). Moving the knob forward and backward moves the collar to engage one of the gears.
Reverse gear is handled by a small idler gear (purple). At all times, the blue reverse gear in this diagram is turning in a direction opposite to all of the other blue gears. Therefore, it would be impossible to throw the transmission into reverse while the car is moving forward -- the dog teeth would never engage. However, they will make a lot of noise!
Manual transmissions in modern passenger cars use synchronizers to eliminate the need for double-clutching. A synchro's purpose is to allow the collar and the gear to make frictional contact before the dog teeth make contact. This lets the collar and the gear synchronize their speeds before the teeth need to engage, like this:
The cone on the blue gear fits into the cone-shaped area in the collar, and friction between the cone and the collar synchronize the collar and the gear. The outer portion of the collar then slides so that the dog teeth can engage the gear.
Every manufacturer implements transmissions and synchros in different ways, but this is the general idea.
For more information on transmissions and related topics, check out the links on the next page.