Papatonk:
I think it`s called Freewheeling Diode:Freewheeling Diode or Flyback Diode Circuit Working And Its Functions
Basically to protect the circuit from reverse current from Solenoid when Solenoid is being turn off.
No, the current doesn't reverse, the voltage reverses to as large a value as needed to keep the
current flowing, the diode provides an easy path to prevent that voltage becoming destructively
large.
Inductive loads store energy in their magnetic field proportional to the square of the current - try
to rapidly reduce the current to zero and all that energy will be driven back into your circuit by force
(ie voltage). The "free-wheel" analogy is like the pedals of a bike - you stop pedalling but the bike
coasts on gently to a stop rather then slamming instantly to a stop and generating huge forces
on your feet!!