To extend alec_t's description (with which I agree) a little further:
When DC current to an inductive load (like a motor) is interrupted, the magnetic field created by the motor coils during normal operation is no longer sustained by the DC current and starts to collapse. This collapsing magnetic field generates a voltage in the now open windings. If there is no current path that would dissipate the energy of the collapsing field, the voltage will build up until a path is created. This forced path may be a spark that you observe at the opening contacts, punch-through of the semiconductor switching the current off, or a hidden arc through the insulation inside the motor coils. All are damaging and undesirable, although the cumulative damage can sometimes take a long time to reveal itself.
To provide a path for discharge of the energy of the collapsing magnetic field, various circuit components are used depending upon the nature and magnitude of the load and the power supply (AC or DC). For a DC powered load, a power diode in parallel with the load is a simple solution. The diode is connected so as to appear to be an open circuit to the power applied to the load during operation. Since the nature of an inductor is to oppose a change in the flow of current through the inductor, when the power to the inductor is interrupted by opening of the relay contacts, the voltage generated by the collapsing field has the polarity tending to force current to continue flowing in the original direction through the inductor. Thus, the (conventional) current external to the inductor tries to flow from the negative terminal of the load to its positive terminal. This forward biases the "anti-parallel" diode, allowing the energy of the collapsing field to be dissipated in heating the diode and the wire of the load. The benefit is that the voltage spike caused by the collapsing field is limited to the forward voltage of the diode, or about 1 volt, thus preventing damage to the contacts or the load.
The disadvantage of this scheme is that the current that circulates during dissipation of the energy of the collapsing load can delay the desired turning off of the load by a short time. For example, a relay being switched off will be slow in dropping out. This is normally not a problem if the load is not performing a time-critical operation. That's for the user to decide.
Proper selection of the "anti-parallel" diode would require knowledge of the inductance of the load and more knowledge than I have. I believe that a very common 1N400x (x being from 1 to 7 depending upon the reverse voltage requirement with the 4001 being rated at 50 volts) would be adequate for most hobby loads. Google "1N4001 and observe that the "non-repetitive surge current" rating of the 400x series is 30 amps. "Non-repetitive," for our purposes means not on every cycle of the AC power line.
Note that the dark band or the point of the arrow printed on the diode represents the cathode - the end of the device that should be connected to the positive terminal of the load. The other end of the diode is the anode which is connected to the negative terminal of the load.
However, be aware that this is a hobbyist speaking, not an electronic engineer.
awright