Here's a simulation of a fly back diode across an inductor modeling a coil (motor, solenoid... etc). This shows the effect of having one and not having one so you can compare the difference. You can try it with actual motor and components but aside from damaging things it’s next to impossible to see this and measure it. The modeling is supported by differential equations which you can use to calculate this also.
Here's the circuit with a flyback diode:
here's the simulation with a flyback diode: notice the current through the diode (ID1) and compare that to the current through the transistor when it’s on... it’s transient but it’s there.
here's the simulation without one - notice the voltage at VC - yes that's 3.6 kV or 3600 Volts!