How does the motor shield determines how much voltage to supply to a motor?
Can i connect 6v DC motor and 12v DC motor to adafruit motor shield v1, and an external 12v power supply?


No.


  how does it determine how much voltage needs to be supplied to a motor?


It doesn't. It supplies whatever voltage you supply through the power input.

You must match the power supply to the motor. The motor shield is merely a switch that turns the power on and off in the right way to change the speed and direction of the motor.