A hub motor sits in the wheel and is cheap and simple; a mid-drive sits at the frame and drives through the chain or belt, giving better weight balance and torque.