The rear hub motor is, as the name indicates, in the rear wheel of the bike. The motor on the rear-axle is located between the rear wheels. These motors are quieter than a mid-drive motor and work as soon as you start cycling so you can get started easily.
On hub motors, the shaft becomes the axle and therefore doesn't spin. Instead, the rotor itself spins, causing the entire motor (hub) to spin, thus creating torque to spin the front or rear wheel.
Hub motors are the most common type of electric skateboard motor. They sit inside the rear wheels of the electric skateboard and directly spin the wheel when they turn. For this reason, they have a gear ratio of 1:1. This means that for every 1 complete rotation the motor makes, the wheel also makes 1 rotation.