Help understanding what is wrong

You need to take the time to learn how to add serial debug output to your sketches. This is an essential skill for success with Arduino. If you read the reference pages for Serial, and spend some time writing and testing simple sketches using the knowledge you gain, you will understand how to do this:

thango:
I dont really know what you mean by open the serial monitor.

It's at Tools > Serial Monitor in the Arduino IDE, or the magnifying glass button. This will open the Serial Monitor, which shows the text you print from the sketch running on your Arduino board. This can be used to get an idea of what is happening in the program.

Right now, all you know is that the motor is not running as you expect it to. But you don't know whether that is caused by a bug in your code, or a problem in the motor circuit. By adding debug output to your sketch, and then watching the output printed to the Serial Monitor while the sketch is running on your Arduino board, you can determine whether the code is running as expected. If the code is running as expected, then that indicates the problem is with how you have your motor wired up. This process of "divide and conquer" is extremely important for troubleshooting. Even if it doesn't lead you immediately to finding the problem, narrowing the scope of the possible causes of the problem is very helpful.