Adafruit Motor Shield

I am a newbie and i am interested of making an obstacle avoiding robot.
Anyways, basically i want to learn ow to control the adafruit motor shield.
I cant find anywhere commands about controlling a specific motor or servo, such as the AF_DCMotor leftMotor(2, MOTOR12_8KHZ) command(found it in a project).
Basically i want to understand how the commands work and the purpose of the frequency values.