For a basic understanding, see https://en.wikiversity.org/wiki/Gears