Electric vehicles are moved with perpetual motion i.e. constant velocity. To accelerate you need to press the accelerator pedal. When you release the accelerator pedal the forward motion stops and the vehicle starts to slow. 

This action immediately stops drawing current and reverses the current to go back into the batteries. The result is twofold – 1 you slow down i.e. breaking & two you put engery back into the battery i.e. regenerating.