A gear is actually a lever that it can be rotated continuously, instead of rocking back and forth through a short distance. The teeth on gear wheels are a series of levers; as one set of levers disengages another engages, so the leverage is applied continuously.
In 1, the gears are the same size, with the same number of teeth: the force and speed are the same for both. Notice though that the rotation is reversed. In 2, the larger wheel has more teeth it so must rotate with less speed. BUT, it does so with more force. These gears are used to change the speed, force, and direction of rotation. 3 is called a rack and pinion. Unlike the previous two examples it also converts rotary motion into linear motion.
The picture above shows a bevel gear. Well not quite a bevel gear as bevel gears are bevelled. This version is known as a pinwheel...much easier to make out of wood. This gear changes the axise of rotation (as well as speed and force if the wheels are of different sizes).
Belts and pulleys are also an important part of most machines. Pulleys are nothing but gears without teeth. Instead of running together directly they are made to drive one another by cords, ropes, cables, or belting of some kind. As with gears, the velocities of pulleys are inversely proportional to their diameters.