It sounds like you'll be needing a motor driver / controller / shield. Arduino pins
cannot handle 12V directly and cannot handle the current levels drawn by even
a small motor.
There are many available, perhaps a bewildering variety... Most are dual H-bridge
controllers using either the L293D, L298 or a MOSFET H-bridge chip. Usually good
to 1A and 24V, but you should check the specifications for a particular board.