What are the things to notice before actually connecting a PWM motor circuit?
Yes, there are things you should notice. Unfortunately, is boils down to "you should have a complete knowledge of electrical engineering." So instead, I will offer two pieces of advice:


you will necessarily break some things in learning
use a current-limited power supply to reduce the number of things you break


A current-limited power supply is one that supplies as much electrical power as it can, without exceeding limits you set for voltage and current. Usually, the supply operates at the voltage limit you set (say, 5V). When you make a mistake and short out the supply, an ordinary power supply will dump as much current as it can into your circuit to try to maintain a 5V output, thus vaporizing your stuff. A current-limited supply will reduce the output voltage to avoid exceeding the current limit you set, thus your stuff may merely get warm rather than being vaporized, allowing you to clear the fault and try again, without another trip to the store to buy a new microcontroller.