Gears are used in tons of mechanical devices. They do several important jobs, but most important, they provide a gear reduction in motorized equipment. This is key because, often, a small motor spinning very fast can provide enough power for a device, but not enough torque. For instance, an electric screwdriver has a very large gear reduction because it needs lots of torque to turn screws, but the motor only produces a small amount of torque at a high speed. With a gear reduction, the output speed can be reduced while the torque is increased.
On any gear, the ratio is determined by the distances from the center of the gear to the point of contact. For instance, in a device with two gears, if one gear is twice the diameter of the other, the ratio would be 2:1.
One of the most primitive types of gears we could look at would be a wheel with wooden pegs sticking out of it.
The problem with this type of gear is that the distance from the center of each gear to the point of contact changes as the gears rotate. This means that the gear ratio changes as the gear turns, meaning that the output speed also changes. If you used a gear like this in your car, it would be impossible to maintain a constant speed -- you would be accelerating and decelerating constantly.
Many modern gears use a special tooth profile called an involute. This profile has the very important property of maintaining a constant speed ratio between the two gears. Like the peg wheel above, the contact point moves; but the shape of the involute gear tooth compensates for this movement.
source: HowStuffWorks "Learn How Everything Works!"