Sorry if i didn't explain it clearly.
What i mean is that JensAI should only use a PWM to control the switching frequency of a BJT (per example BC549 - general use).
The circuit should be something like the figure attached. ( I'm sorry for HORRIBLE draw. I'm just too tired to turn on my pc and create the schematic
As the PWM goes to 100% the motor speed is at it's maximum. As the PWM goes down, so does the motor speed, until it completly stops if your PWM is zero.
ps.: BJT's are semi-conductors that can be used as a switch. Easy to find at eletronic stores (at least here in my city
ps2: Be sure to simulate your circuit before and check the datasheet.
ps3.: I can suggest ORCAD software for simulating (may be a bit complex for a new user but there are plently videos teaching how to use it) and i think it has student version.
You could even try one of the Demo's of Matlab's Simulink, if you or your school have the license. It's easy to do this using Simulink with the Arduino package.
However if you got a few dollars and access to Google's Play Store, there is another option: Droid Tesla app. It's pretty easy to use and understand.