Watch an example of how a motorised bike can work.
This mountain bike - showcased at a demonstration day in 2014 - uses a battery hidden in a seat pack to power the motor.
Video courtesy of grit.cx