If you connect two direct current motors so that the current flowing through one also flows through the other, then turning one motor will cause the other motor to turn as well. If you reverse the direction of rotation, the other motor will also reverse its direction of rotation. Why does this happen?
DC motors turn in a direction that depends on the direction of that current. If you reverse the direction of current flowing through the motor, its direction reverses, too. When you use one DC motors as a generator, it produces DC current! The direction of that current depends on which way you turn the motor. Thus as you turn the first motor clockwise, it generates current in a particular direction through the circuit connecting the two motors and the second motor also turns clockwise. If you then reverse the first motor, the current in the circuit reverses and so does the second motor.