How do Mosfets and potentiometers work together?
The MOSFET is connected as a "source follower" meaning that the voltage at the source (more or less) follows the voltage at the gate, minus a volt or three, depending on the type of MOSFET. 

The potentiometer is connected as a voltage divider, across the source voltage, so it provides a voltage (relative to the '-' of the source, which I hereby dub "ground") that is (more or less) proportional to the angle of the wiper. 

So the source voltage is a variable and relatively "stiff" voltage (meaning it doesn't change much with current). The motor is connected from that voltage to ground. 

The motor is a permanent magnet DC brushed type. The torque is proportional to the rotor current. The rotor current, and therefore the torque, is proportional to the difference between the back-EMF of the motor and the applied voltage, so the motor speed is (more or less) constant with varying amounts of torque. (The back-EMF is proportional to the rotor RPM). 

Say the winding resistance is 10 ohms. The stall current of the motor with 10V applied is thus 1A (and with 5V applied, 0.5A). As the motor speeds up, the back EMF increases, and thus the current and resulting torque drops,  until an equilibrium is established (even with no load on the shaft, a bit of torque is required to spin the motor due to friction and 'windage'). 

The back-EMF is just the voltage you would read on a voltmeter connected across the motor terminals if you spun the shaft at a certain RPM. 



More efficient circuits would use a PWM rather than throwing away the power in the MOSFET. More accurate speed controls might measure the motor RPM and correct for changes, or would apply IR compensation (effectively inserting a bit of negative resistance to compensate for the resistance of the windings). 



Note that normally one would like to see a catch diode across the motor, but it is unnecessary in this particular case.