Why would I need a relay between a DC motor and my Arduino?
Firstly, a motor is a very power hungry device.  An Arduino IO pin can only provide an absolute maximum of 40mA from an IO pin, and Atmel don't guarantee anything over 20mA.  A motor typically takes considerably more than that, especially during it's acceleration phase.

Powering a motor direct from an IO pin is not only a Bad Idea™ but is also doomed to failure from the outset.

So you need something to provide more current to the motor, and that means some form of external switch.

Yes, you can use a relay as that switch, however a relay also suffers the same problems as a motor - they are generally quite power hungry, and need some form of external switch to allow the Arduino to drive them.  Yes, you can get relays that are weak enough for an Arduino to drive direct, and you can get relays with built in switching circuits, but in general most relays are too powerful for a mere Arduino to switch.

So you need another option, and that option is a transistor.

Secondly, motors (and relays) are very noisy devices.  Regardless of the amount of current required to drive them, they will be creating lots and lots of voltage spikes, both positive and negative, on their connections.  You really don't want those spikes going into your Arduino an making the Magic Smoke™ escape.  So you need to divert them elsewhere.  That requires a diode reverse biased across the winding / coil of the motor / relay.  Also the transistor you use to drive the motor or relay acts as an extra layer of separation from the Arduino keeping those spikes away.

So follow the (millions of examples - ask Google) standard circuits for driving a relay or motor through a transistor from an Arduino and you will be safe.