I've decided to use the l298n motot driver in order to control the direoction of motor rotation, so I had the following wires connected this way:
9V power supply to the 12V+ and its second wire to ground, I also had the ground connected with arduino ground as some sources suggested. I had out1 and out2 connected to the motor and in1 and in2 to the digital pins on my arduino.
I ysed the most basic code there is to determine if it works (in1, HIGH. In2, LOW basically) but it didn't rotate at all. The weird thing is that after unplugging one of the wires (either in1 or in2, don't remember exactly, but it didn't happen when unplugging the other one of these) and touching the big black heat sink in the middle of the driver it started rotating, I don't even know how. Could it be that it's just a faulty hardware problem?