Gears are necessary to craft BuildCraft Engines and machines, like the Quarry. The gears must be constructed sequentially, so in order to make one Diamond Gear you need four Sticks, four Cobblestone, four Iron, four Gold and four Diamonds.
To upgrade a gear, simply place your gear in the middle and surround it on adjacent sides with the next tier material (wood -> stone -> Iron -> Gold -> Diamond).
Crafting the Wooden Gear
EMC = 16
Crafting the Stone Gear
Crafting the Redstone Engine
Crafting the Automatic Crafting Table