These are an older more basic technology of the two types. They spin either the front or rear wheel at a certain speed, while you turn the pedals.
The speed of a hub motor is dependent on how fast your wheels are turning. Unfortunately, that means that on steep slopes, where your wheels are turning slowly but you generally need the most support from the motor, it produces the least power.