Using same Voltage supply to power Arduino Board and motor simultaneously is usually not a good practice.
So, what you can do is use separate batteries to power Arduino and motor as shown in image below
[![enter image description here][1]][1]
However you can also power arduino and motor from single power supply, but in this case you should first think of current ratting of your battery and current consumption of your Arduino (normally 500mA) and motor. As shown below,
[![enter image description here][2]][2]
Hope
Hope it help. Any question Comment below.
[1]: https://i.sstatic.net/s0mYR.jpg
[2]: https://i.sstatic.net/O1L1a.jpg