In general gears, the direction of rotation is reversed each time it is bitten.

By adjusting the radius ratio of the gear, you can adjust the rotational angular speed and torque.
When power is transmitted from a small gear to a large gear, the angular speed is slowed, but the torque increases,
When power is transmitted from a large gear to a small gear, the angular velocity increases, but the torque decreases.

And, when gears with different radii are fixed to one shaft, they act like shaft wheels.

Without the friction of the gears, the 'principle of work' applies like any other tool. (If you use tools, you can gain strength, but there is no benefit of work)