user43349: I'm trying to understand this circuit found here.

I understand that the Arduino cannot directly run a DC motor because it can only supply 40mA of current and also due to the back EMF which can damage it. I can also understand this circuit if they used an external power supply and used the transistor as a switch to drive the DC motor. But, I do not understand this configuration shown in the pic where the power supply is the arduino itself.

user4143: Your confusion lies in what can "supply" power.
Your assumptions are all correct for an IO pin. However the Arduino has more than just IO pins. It has power pins.
These power pins are not controlled in any way by the microcontroller - they are merely connections into the power supply circuit that also powers the microcontroller.
So in that circuit the Arduino's power supply is shared between the Arduino (the MCU) and the motor.
The 5V pin of the Arduino can supply up to 450mA (when powered from USB - 500mA less about 50mA for the MCU) or up to 800mA when supplied with about 6.5V into the barrel jack (any more than that will cause excess heat to be dissipated which will reduce the maximum current the 5V regulator can handle before shutting down).

43349: <p>I'm trying to understand this circuit found <a href="https://www.instructables.com/How-to-drive-a-DC-Motor-with-Transistor-Arduino-Tu/" rel="nofollow noreferrer">here</a>.
<a href="https://i.stack.imgur.com/1j0ti.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1j0ti.png" alt="enter image description here" /></a></p>
<p>I understand that the Arduino cannot directly run a DC motor because it can only supply 40mA of current and also due to the back EMF which can damage it. I can also understand this circuit if they used an external power supply and used the transistor as a switch to drive the DC motor. But, I do not understand this configuration shown in the pic where the power supply is the arduino itself.</p>
 4143: <p>Your confusion lies in <em>what</em> can &quot;supply&quot; power.</p>
<p>Your assumptions are all correct <em>for an IO pin</em>. However the Arduino has <em>more</em> than just IO pins. It has power pins.</p>
<p>These power pins are not controlled in any way by the microcontroller - they are merely connections into the power supply circuit that also powers the microcontroller.</p>
<p>So in that circuit the Arduino's power supply is shared between the Arduino (the MCU) and the motor.</p>
<p>The 5V pin of the Arduino can supply up to 450mA (when powered from USB - 500mA less about 50mA for the MCU) or up to 800mA when supplied with about 6.5V into the barrel jack (any more than that will cause excess heat to be dissipated which will reduce the maximum current the 5V regulator can handle before shutting down).</p>
