Plenty of tutorials exist for animating gears in 3D or 2D. For the most part, they are all the same type of round, flat-toothed gears of various size. While that is all well and good, there is actually a whole wealth of other types of gears, too. I once had a mechanical engineering reference that laid out all the different types of gears and how they worked. It was not only fascinating, but it was also a great reference when I needed to make up and build something mechanical.
Some gears are pretty odd and difficult to figure out and animate. One such oddity, is the worm gear. It consists of a standard gear that is driven by a spiraling cylindrical screw shape. This worm gear design is meant to reduce rotational speed while still giving a higher torque ratting. Of course, I would not known this had I not checked my handy reference.
Julian Field, who is also known as the Xpresso mechanic for obvious reasons posses a great exercise in Cinema 4D: Modeling and animating one of these worm gears. With his latest two part tutorial, Julian starts by looking at a modeling technique for the actual worm gear, while the second part looks at using Xpresso to animate the mechanism.